From 56ba6481eb11e2c8aac8586cb572b411cf74a13f Mon Sep 17 00:00:00 2001 From: Marcos Borges <205091563+MarcosBorgesPhD@users.noreply.github.com> Date: Fri, 10 Jul 2026 17:54:12 +0200 Subject: [PATCH 1/2] Update repository and organization references to Safety-Critical-Rust-Consortium --- .../test_issue_01.json | 28 +++++++++---------- .../test_issue_02.json | 28 +++++++++---------- .../test_issue_03.json | 28 +++++++++---------- .../test_issue_04.json | 28 +++++++++---------- CONTRIBUTING.md | 4 +-- README.md | 4 +-- REVIEWING.md | 6 ++-- docs/issue-formatting-guide.md | 2 +- scripts/README.md | 6 ++-- scripts/guideline-from-issue.py | 2 +- scripts/reviewer_bot_lib/state_store.py | 2 +- .../cert-c-2016-mapping.rst | 6 ++-- .../reviewer_bot/test_adapter_contract.py | 12 ++++---- .../test_stage2_closure_artifacts.py | 4 +-- .../test_workflow_artifact_contracts.py | 12 ++++---- .../reviewer_bot/test_workflow_files.py | 12 ++++---- .../fixtures/reviewer_bot_sweeper_builders.py | 2 +- ...ferred_payload_legacy_closure_blocked.json | 4 +-- ...deferred_payload_legacy_closure_green.json | 6 ++-- ...ition_notice_fallback_closure_blocked.json | 4 +-- ...nsition_notice_fallback_closure_green.json | 6 ++-- .../test_app_closed_issue_cleanup.py | 4 +-- .../reviewer_bot/test_app_execution.py | 2 +- .../test_app_preview_issue314_state_health.py | 6 ++-- .../reviewer_bot/test_app_preview_overdue.py | 4 +-- ...est_app_preview_status_label_projection.py | 2 +- .../test_app_repair_issue314_state_health.py | 8 +++--- .../test_app_repair_status_labels.py | 4 +-- .../test_app_reviewer_board_preview.py | 4 +-- .../test_comment_routing_integration.py | 2 +- tests/unit/reviewer_bot/test_commands.py | 4 +-- .../unit/reviewer_bot/test_comment_routing.py | 12 ++++---- .../test_comment_routing_equivalence.py | 16 +++++------ .../test_comment_routing_policy.py | 2 +- .../reviewer_bot/test_fixture_contracts.py | 2 +- .../test_issue314_state_health.py | 16 +++++------ tests/unit/reviewer_bot/test_lifecycle.py | 12 ++++---- tests/unit/reviewer_bot/test_maintenance.py | 6 ++-- .../reviewer_bot/test_reviews_projection.py | 2 +- tests/unit/reviewer_bot/test_state_store.py | 2 +- tests/unit/reviewer_bot/test_sweeper_logic.py | 4 +-- 41 files changed, 160 insertions(+), 160 deletions(-) diff --git a/.github/guideline-from-issue-tests/test_issue_01.json b/.github/guideline-from-issue-tests/test_issue_01.json index bcf3e0daf..df052d366 100644 --- a/.github/guideline-from-issue-tests/test_issue_01.json +++ b/.github/guideline-from-issue-tests/test_issue_01.json @@ -1,10 +1,10 @@ { - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/4", - "repository_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines", - "labels_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/4/labels{/name}", - "comments_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/4/comments", - "events_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/4/events", - "html_url": "https://github.com/rustfoundation/safety-critical-rust-coding-guidelines/issues/4", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/4", + "repository_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", + "labels_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/4/labels{/name}", + "comments_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/4/comments", + "events_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/4/events", + "html_url": "https://github.com/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/4", "id": 3104390263, "node_id": "I_kwDOOMMjbs65CTx3", "number": 4, @@ -34,7 +34,7 @@ { "id": 8703664686, "node_id": "LA_kwDOOMMjbs8AAAACBsdiLg", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/category:%20advisory", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/category:%20advisory", "name": "category: advisory", "color": "ededed", "default": false, @@ -43,7 +43,7 @@ { "id": 8703664688, "node_id": "LA_kwDOOMMjbs8AAAACBsdiMA", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/status:%20draft", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/status:%20draft", "name": "status: draft", "color": "ededed", "default": false, @@ -52,7 +52,7 @@ { "id": 8703664689, "node_id": "LA_kwDOOMMjbs8AAAACBsdiMQ", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/decidability:%20decidable", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/decidability:%20decidable", "name": "decidability: decidable", "color": "ededed", "default": false, @@ -61,7 +61,7 @@ { "id": 8703686409, "node_id": "LA_kwDOOMMjbs8AAAACBse3CQ", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/chapter:%20concurrency", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/chapter:%20concurrency", "name": "chapter: concurrency", "color": "ededed", "default": false, @@ -70,7 +70,7 @@ { "id": 8703686412, "node_id": "LA_kwDOOMMjbs8AAAACBse3DA", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/scope:%20crate", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/scope:%20crate", "name": "scope: crate", "color": "ededed", "default": false, @@ -79,7 +79,7 @@ { "id": 8703732885, "node_id": "LA_kwDOOMMjbs8AAAACBshslQ", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/accepted", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/accepted", "name": "accepted", "color": "6AABE8", "default": false, @@ -107,7 +107,7 @@ "body": "### Chapter\n\nConcurrency\n\n### Guideline Title\n\ntest ga\n\n### Category\n\nAdvisory\n\n### Status\n\nDraft\n\n### Release Begin\n\n1.1.1\n\n### Release End\n\n1.1.1\n\n### FLS Paragraph ID\n\nfls_fsdjkfslkdfj\n\n### Decidability\n\nDecidable\n\n### Scope\n\nCrate\n\n### Tags\n\ntest gatest ga\n\n### Amplification\n\nhehehehe\n\n### Exception(s)\n\n_No response_\n\n### Rationale\n\ntest ga\n\n### Non-Compliant Example - Prose\n\ntest ga\n\n### Non-Compliant Example - Code\n\ndfhsdfkjshdfskdjhftest ga\n\n### Compliant Example - Prose\n\ntest ga\n\n### Compliant Example - Code\n\ntest ga", "closed_by": null, "reactions": { - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/4/reactions", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/4/reactions", "total_count": 0, "+1": 0, "-1": 0, @@ -118,7 +118,7 @@ "rocket": 0, "eyes": 0 }, - "timeline_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/4/timeline", + "timeline_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/4/timeline", "performed_via_github_app": null, "state_reason": null } diff --git a/.github/guideline-from-issue-tests/test_issue_02.json b/.github/guideline-from-issue-tests/test_issue_02.json index 591bb1010..d0bb5b2ea 100644 --- a/.github/guideline-from-issue-tests/test_issue_02.json +++ b/.github/guideline-from-issue-tests/test_issue_02.json @@ -1,10 +1,10 @@ { - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/4", - "repository_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines", - "labels_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/4/labels{/name}", - "comments_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/4/comments", - "events_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/4/events", - "html_url": "https://github.com/rustfoundation/safety-critical-rust-coding-guidelines/issues/4", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/4", + "repository_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", + "labels_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/4/labels{/name}", + "comments_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/4/comments", + "events_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/4/events", + "html_url": "https://github.com/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/4", "id": 3104390263, "node_id": "I_kwDOOMMjbs65CTx3", "number": 4, @@ -34,7 +34,7 @@ { "id": 8703664686, "node_id": "LA_kwDOOMMjbs8AAAACBsdiLg", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/category:%20advisory", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/category:%20advisory", "name": "category: advisory", "color": "ededed", "default": false, @@ -43,7 +43,7 @@ { "id": 8703664688, "node_id": "LA_kwDOOMMjbs8AAAACBsdiMA", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/status:%20draft", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/status:%20draft", "name": "status: draft", "color": "ededed", "default": false, @@ -52,7 +52,7 @@ { "id": 8703664689, "node_id": "LA_kwDOOMMjbs8AAAACBsdiMQ", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/decidability:%20decidable", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/decidability:%20decidable", "name": "decidability: decidable", "color": "ededed", "default": false, @@ -61,7 +61,7 @@ { "id": 8703686409, "node_id": "LA_kwDOOMMjbs8AAAACBse3CQ", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/chapter:%20concurrency", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/chapter:%20concurrency", "name": "chapter: concurrency", "color": "ededed", "default": false, @@ -70,7 +70,7 @@ { "id": 8703686412, "node_id": "LA_kwDOOMMjbs8AAAACBse3DA", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/scope:%20crate", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/scope:%20crate", "name": "scope: crate", "color": "ededed", "default": false, @@ -79,7 +79,7 @@ { "id": 8703732885, "node_id": "LA_kwDOOMMjbs8AAAACBshslQ", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/accepted", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/accepted", "name": "accepted", "color": "6AABE8", "default": false, @@ -107,7 +107,7 @@ "body": "### Chapter\n\nAssociated Items\n\n### Guideline Title\n\nRecursive function are not allowed\n\n### Category\n\nRequired\n\n### Status\n\nDraft\n\n### Release Begin\n\n1.3.0\n\n### Release End\n\nlatest\n\n### FLS Paragraph ID\n\nfls_vjgkg8kfi93\n\n### Decidability\n\nUndecidable\n\n### Scope\n\nSystem\n\n### Tags\n\nreduce-human-error\n\n### Amplification\n\nAny function shall not call itself directly or indirectly\n\n### Exception(s)\n\nRecursion may be permitted under the following conditions:\n- The recursion termination condition is simple, explicit, and well-defined.\n- The function calls itself directly, or with strictly limited and clearly documented indirection.\n- The maximum recursion depth is statically bounded and justified, ensuring no risk of stack overflow.\n- The rationale for using recursion, rather than iteration, is clearly documented and reviewed.\n- The code is accompanied by tests that exercise the recursion boundary conditions.\n\n### Rationale\n\nRecursive functions can easily cause stack overflows, which may result in exceptions or, in some cases, undefined behavior (typically some embedded systems). Although the Rust compiler supports [tail call optimization](https://en.wikipedia.org/wiki/Tail_call), this optimization is not guaranteed and depends on the specific implementation and function structure. There is an [open RFC to guarantee tail call optimization in the Rust compiler](https://github.com/phi-go/rfcs/blob/guaranteed-tco/text/0000-explicit-tail-calls.md), but this feature has not yet been stabilized. Until tail call optimization is guaranteed and stabilized, developers should avoid using recursive functions to prevent potential stack overflows and ensure program reliability.\n\n### Non-Compliant Example - Prose\n\nThe below function `concat_strings` is not complaint because it call itself and depending on depth of data provided as input it could generate an stack overflow exception or undefine behavior.\n\n### Non-Compliant Example - Code\n\n```rust\n// Recursive enum to represent a string or a list of `MyEnum`\nenum MyEnum {\n Str(String),\n List(Vec),\n}\n\n// Concatenates strings from a nested structure of `MyEnum` using recursion.\nfn concat_strings(input: &[MyEnum]) -> String {\n let mut result = String::new();\n for item in input {\n match item {\n MyEnum::Str(s) => result.push_str(s),\n MyEnum::List(list) => result.push_str(&concat_strings(list)),\n }\n }\n result\n}\n```\n\n### Compliant Example - Prose\n\nThe following code implements the same functionality using iteration instead of recursion. The `stack` variable is used to maintain the processing context at each step of the loop. This approach provides explicit control over memory usage. If the stack grows beyond a predefined limit due to the structure or size of the input, the function returns an error rather than risking a stack overflow or out-of-memory exception. This ensures more predictable and robust behavior in resource-constrained environments.\n\n### Compliant Example - Code\n\n```rust\n// Recursive enum to represent a string or a list of `MyEnum`\nenum MyEnum {\n Str(String),\n List(Vec),\n}\n\n/// Concatenates strings from a nested structure of `MyEnum` without using recursion.\n/// Returns an error if the stack size exceeds `MAX_STACK_SIZE`.\nfn concat_strings_non_recursive(input: &[MyEnum]) -> Result {\n const MAX_STACK_SIZE: usize = 1000;\n let mut result = String::new();\n let mut stack = Vec::new();\n\n // Add all items to the stack\n stack.extend(input.iter());\n\n while let Some(item) = stack.pop() {\n match item {\n MyEnum::Str(s) => result.insert_str(0, s),\n MyEnum::List(list) => {\n // Add list items to the stack\n for sub_item in list.iter() {\n stack.push(sub_item);\n if stack.len() > MAX_STACK_SIZE {\n return Err(\"Too big structure\");\n }\n }\n }\n }\n }\n Ok(result)\n}\n```", "closed_by": null, "reactions": { - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/4/reactions", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/4/reactions", "total_count": 0, "+1": 0, "-1": 0, @@ -118,7 +118,7 @@ "rocket": 0, "eyes": 0 }, - "timeline_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/4/timeline", + "timeline_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/4/timeline", "performed_via_github_app": null, "state_reason": null } diff --git a/.github/guideline-from-issue-tests/test_issue_03.json b/.github/guideline-from-issue-tests/test_issue_03.json index f2708544b..4ea649d74 100644 --- a/.github/guideline-from-issue-tests/test_issue_03.json +++ b/.github/guideline-from-issue-tests/test_issue_03.json @@ -1,10 +1,10 @@ { - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/103", - "repository_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines", - "labels_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/103/labels{/name}", - "comments_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/103/comments", - "events_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/103/events", - "html_url": "https://github.com/rustfoundation/safety-critical-rust-coding-guidelines/issues/103", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/103", + "repository_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", + "labels_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/103/labels{/name}", + "comments_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/103/comments", + "events_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/103/events", + "html_url": "https://github.com/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/103", "id": 3104390103, "node_id": "I_kwDOOMMjbs65CTx103", "number": 103, @@ -34,7 +34,7 @@ { "id": 8703664686, "node_id": "LA_kwDOOMMjbs8AAAACBsdiLg", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/category:%20mandatory", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/category:%20mandatory", "name": "category: mandatory", "color": "ededed", "default": false, @@ -43,7 +43,7 @@ { "id": 8703664688, "node_id": "LA_kwDOOMMjbs8AAAACBsdiMA", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/status:%20draft", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/status:%20draft", "name": "status: draft", "color": "ededed", "default": false, @@ -52,7 +52,7 @@ { "id": 8703664689, "node_id": "LA_kwDOOMMjbs8AAAACBsdiMQ", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/decidability:%20decidable", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/decidability:%20decidable", "name": "decidability: decidable", "color": "ededed", "default": false, @@ -61,7 +61,7 @@ { "id": 8703686409, "node_id": "LA_kwDOOMMjbs8AAAACBse3CQ", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/chapter:%20numerics", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/chapter:%20numerics", "name": "chapter: numerics", "color": "ededed", "default": false, @@ -70,7 +70,7 @@ { "id": 8703686412, "node_id": "LA_kwDOOMMjbs8AAAACBse3DA", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/scope:%20module", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/scope:%20module", "name": "scope: module", "color": "ededed", "default": false, @@ -79,7 +79,7 @@ { "id": 8703732885, "node_id": "LA_kwDOOMMjbs8AAAACBshslQ", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/accepted", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/accepted", "name": "accepted", "color": "6AABE8", "default": false, @@ -107,7 +107,7 @@ "body": "### Chapter\n\nNumerics\n\n### Guideline Title\n\nInteger shift shall only be performed through `checked_` APIs\n\n### Category\n\nMandatory\n\n### Status\n\nDraft\n\n### Release Begin\n\n1.7.0\n\n### Release End\n\nlatest\n\n### FLS Paragraph ID\n\nfls_sru4wi5jomoe\n\n### Decidability\n\nDecidable\n\n### Scope\n\nModule\n\n### Tags\n\nnumerics, reduce-human-error, maintainability, portability, surprising-behavior\n\n### Amplification\n\nIn particular, the user should only perform left shifts via the [checked_shl](https://doc.rust-lang.org/core/index.html?search=%22checked_shl%22) function and right shifts via the [checked_shr](https://doc.rust-lang.org/core/index.html?search=%22checked_shr%22) function. Both of these functions exist in [core](https://doc.rust-lang.org/core/index.html).\n\nThis rule applies to the following primitive types:\n\n- `i8`\n- `i16`\n- `i32`\n- `i64`\n- `i128`\n- `u8`\n- `u16`\n- `u32`\n- `u64`\n- `u128`\n- `usize`\n- `isize`\n\n### Exception(s)\n\n_No response_\n\n### Rationale\n\nThis is directly inspired by [INT34-C. Do not shift an expression by a negative number of bits or by greater than or equal to the number of bits that exist in the operand](https://wiki.sei.cmu.edu/confluence/display/c/INT34-C.+Do+not+shift+an+expression+by+a+negative+number+of+bits+or+by+greater+than+or+equal+to+the+number+of+bits+that+exist+in+the+operand).\n\nIn Rust these out-of-range shifts don't give rise to Undefined Behavior; however, they are still problematic in Safety Critical contexts for two reasons.\n\n**Reason 1: inconsistent behavior**\n\nThe behavior of shift operations depends on the compilation mode. Say for example, that we have a number `x` of type `uN`, and we perform the operation\n\n`x << M`\n\nThen, it will behave like this:\n\n| **Compilation Mode** | `0 <= M < N` | `M < 0` | `N <= M` |\n|---|---|---|---|\n| Debug | Shifts normally | Panics | Panics |\n| Release | Shifts normally | Shifts by `M mod N` | Shifts by `M mod N` |\n\n..\n\n Note: the behavior is exactly the same for the `>>` operator.\n\nPanicking in `Debug` is an issue by itself, however, a perhaps larger issue there is that its behavior is different from that of `Release`. Such inconsistencies aren't acceptable in Safety Critical scenarios.\n\nTherefore, a consistently-behaved operation should be required for performing shifts.\n\n## Reason 2: programmer intent\n\nThere is no scenario in which it makes sense to perform a shift of negative length, or of more than `N - 1` bits. The operation itself becomes meaningless.\n\nTherefore, an API that restricts the length of the shift to the range `[0, N - 1]` should be used instead of the `<<` and `>>` operators.\n\n## The Solution\n\nThe ideal solution for this exists in `core`: `checked_shl` and `checked_shr`.\n\n`::checked_shl(M)` returns a value of type `Option`, in the following way:\n\n- If `M < 0`, the output is `None`\n- If `0 <= M < N` for `T` of `N` bits, then the output is `Some(T)`\n- If `N <= M`, the output is `None`\n\nThis API has consistent behavior across `Debug` and `Release`, and makes the programmer intent explicit, which effectively solves this issue.\n\n### Non-Compliant Example 1 - Prose\n\nAs seen below in the `non_compliant_example()` function:\n\n- the use of `<<` will exhibit different behavior between debug and release builds,\n- and will panic if the shift amount is negative or greater than or equal to the number of bits.\n\n### Non-Compliant Example 1 - Code\n\n```rust\nfn non_compliant_example() {\n let x: u32 = 1;\n let shift_amount: u32 = 32; // This is >= the number of bits in u32\n\n // This will panic in debug mode, or wrap in release mode\n let result = x << shift_amount;\n println!(\"Result: {}\", result);\n}\n```\n\n### Non-Compliant Example 2 - Prose (Optional)\n\n_No response_\n\n### Non-Compliant Example 2 - Code (Optional)\n\n_No response_\n\n### Non-Compliant Example 3 - Prose (Optional)\n\n_No response_\n\n### Non-Compliant Example 3 - Code (Optional)\n\n_No response_\n\n### Non-Compliant Example 4 - Prose (Optional)\n\n_No response_\n\n### Non-Compliant Example 4 - Code (Optional)\n\n_No response_\n\n### Compliant Example 1 - Prose\n\nAs seen below in the `compliant_example()` function:\n\n- the use of `checked_shl` will exhibit consistent behavior between debug and release builds,\n- and will return `None` if the shift amount is negative or greater than or equal to the number of bits.\n\n### Compliant Example 1 - Code\n\n```rust\nfn compliant_example() {\n let x: u32 = 1;\n let shift_amount: u32 = 32; // This is >= the number of bits in u32\n\n // This will return None instead of panicking or wrapping\n match x.checked_shl(shift_amount) {\n Some(result) => println!(\"Result: {}\", result),\n None => println!(\"Shift amount is out of range\"),\n }\n}\n```\n\n### Compliant Example 2 - Prose (Optional)\n\n_No response_\n\n### Compliant Example 2 - Code (Optional)\n\n_No response_\n\n### Compliant Example 3 - Prose (Optional)\n\n_No response_\n\n### Compliant Example 3 - Code (Optional)\n\n_No response_\n\n### Compliant Example 4 - Prose (Optional)\n\n_No response_\n\n### Compliant Example 4 - Code (Optional)\n\n_No response_\n\n### Bibliography\n\n_No response_", "closed_by": null, "reactions": { - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/103/reactions", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/103/reactions", "total_count": 0, "+1": 0, "-1": 0, @@ -118,7 +118,7 @@ "rocket": 0, "eyes": 0 }, - "timeline_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/103/timeline", + "timeline_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/103/timeline", "performed_via_github_app": null, "state_reason": null } diff --git a/.github/guideline-from-issue-tests/test_issue_04.json b/.github/guideline-from-issue-tests/test_issue_04.json index 399c8031b..8c7ce21b6 100644 --- a/.github/guideline-from-issue-tests/test_issue_04.json +++ b/.github/guideline-from-issue-tests/test_issue_04.json @@ -1,10 +1,10 @@ { - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/104", - "repository_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines", - "labels_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/104/labels{/name}", - "comments_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/104/comments", - "events_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/104/events", - "html_url": "https://github.com/rustfoundation/safety-critical-rust-coding-guidelines/issues/104", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/104", + "repository_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", + "labels_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/104/labels{/name}", + "comments_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/104/comments", + "events_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/104/events", + "html_url": "https://github.com/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/104", "id": 3104390104, "node_id": "I_kwDOOMMjbs65CTx104", "number": 104, @@ -34,7 +34,7 @@ { "id": 8703664686, "node_id": "LA_kwDOOMMjbs8AAAACBsdiLg", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/category:%20required", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/category:%20required", "name": "category: required", "color": "ededed", "default": false, @@ -43,7 +43,7 @@ { "id": 8703664688, "node_id": "LA_kwDOOMMjbs8AAAACBsdiMA", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/status:%20draft", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/status:%20draft", "name": "status: draft", "color": "ededed", "default": false, @@ -52,7 +52,7 @@ { "id": 8703664689, "node_id": "LA_kwDOOMMjbs8AAAACBsdiMQ", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/decidability:%20undecidable", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/decidability:%20undecidable", "name": "decidability: undecidable", "color": "ededed", "default": false, @@ -61,7 +61,7 @@ { "id": 8703686409, "node_id": "LA_kwDOOMMjbs8AAAACBse3CQ", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/chapter:%20unsafety", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/chapter:%20unsafety", "name": "chapter: unsafety", "color": "ededed", "default": false, @@ -70,7 +70,7 @@ { "id": 8703686412, "node_id": "LA_kwDOOMMjbs8AAAACBse3DA", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/scope:%20module", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/scope:%20module", "name": "scope: module", "color": "ededed", "default": false, @@ -79,7 +79,7 @@ { "id": 8703732885, "node_id": "LA_kwDOOMMjbs8AAAACBshslQ", - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/labels/accepted", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/labels/accepted", "name": "accepted", "color": "6AABE8", "default": false, @@ -107,7 +107,7 @@ "body": "### Chapter\n\nUnsafety\n\n### Guideline Title\n\nUnions shall only be accessed within unsafe blocks with documented invariants\n\n### Category\n\nRequired\n\n### Status\n\nDraft\n\n### Release Begin\n\n1.0.0\n\n### Release End\n\nlatest\n\n### FLS Paragraph ID\n\nfls_fmdn7n7s413d\n\n### Decidability\n\nUndecidable\n\n### Scope\n\nModule\n\n### Tags\n\nunsafe, unions, undefined-behavior\n\n### Amplification\n\nAs documented in [RUST-REF-UNION], reading from a union field is unsafe because the compiler cannot guarantee that the data stored in the union is valid for the type being read.\n\nAll union field accesses must:\n- Be within an `unsafe` block\n- Have a safety comment documenting the invariant that makes the access valid\n\n### Exception(s)\n\n_No response_\n\n### Rationale\n\nThe Rust Reference [RUST-REF-UNION] specifies that unions allow storing different types in the same memory location, similar to C unions. Reading the wrong field leads to undefined behavior.\n\nThis aligns with [CERT-C-EXP39] which addresses similar concerns in C code.\n\n### Non-Compliant Example 1 - Prose\n\nThe following code accesses a union field without documenting why the access is safe, violating the guideline.\n\n### Non-Compliant Example 1 - Code\n\n```rust\nunion MyUnion {\n i: i32,\n f: f32,\n}\n\nfn bad_example() {\n let u = MyUnion { i: 42 };\n // Missing safety comment!\n let value = unsafe { u.i };\n}\n```\n\n### Non-Compliant Example 2 - Prose (Optional)\n\n_No response_\n\n### Non-Compliant Example 2 - Code (Optional)\n\n_No response_\n\n### Non-Compliant Example 3 - Prose (Optional)\n\n_No response_\n\n### Non-Compliant Example 3 - Code (Optional)\n\n_No response_\n\n### Non-Compliant Example 4 - Prose (Optional)\n\n_No response_\n\n### Non-Compliant Example 4 - Code (Optional)\n\n_No response_\n\n### Compliant Example 1 - Prose\n\nThe following code properly documents the safety invariant when accessing the union field, as recommended by [RUST-REF-UNION].\n\n### Compliant Example 1 - Code\n\n```rust\nunion MyUnion {\n i: i32,\n f: f32,\n}\n\nfn good_example() {\n let u = MyUnion { i: 42 };\n // SAFETY: We just initialized the union with an i32 value,\n // so reading the i32 field is valid.\n let value = unsafe { u.i };\n}\n```\n\n### Compliant Example 2 - Prose (Optional)\n\n_No response_\n\n### Compliant Example 2 - Code (Optional)\n\n_No response_\n\n### Compliant Example 3 - Prose (Optional)\n\n_No response_\n\n### Compliant Example 3 - Code (Optional)\n\n_No response_\n\n### Compliant Example 4 - Prose (Optional)\n\n_No response_\n\n### Compliant Example 4 - Code (Optional)\n\n_No response_\n\n### Bibliography\n\n[RUST-REF-UNION]: https://doc.rust-lang.org/reference/items/unions.html \"The Rust Reference | Unions\"\n[CERT-C-EXP39]: https://wiki.sei.cmu.edu/confluence/display/c/EXP39-C.+Do+not+access+a+variable+through+a+pointer+of+an+incompatible+type \"SEI CERT C | EXP39-C. Do not access a variable through a pointer of an incompatible type\"", "closed_by": null, "reactions": { - "url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/104/reactions", + "url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/104/reactions", "total_count": 0, "+1": 0, "-1": 0, @@ -118,7 +118,7 @@ "rocket": 0, "eyes": 0 }, - "timeline_url": "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/104/timeline", + "timeline_url": "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/104/timeline", "performed_via_github_app": null, "state_reason": null } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 487d626d2..778a07e67 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,7 @@ # Contributing to the coding guidelines - Looking for the review process? That's in [REVIEWING.md](REVIEWING.md). -- Want to [open an issue](https://github.com/rustfoundation/safety-critical-rust-coding-guidelines/issues)? +- Want to [open an issue](https://github.com/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues)? - Want to write a Safety Critical Rust Coding guideline? You're in the right place. ## Contribution Workflow @@ -55,7 +55,7 @@ The Safety Critical Rust Coding guidelines has the same chapter layout as the [F In this example, the FLS ID is `fls_4rhjpdu4zfqj`. -3. Add a new coding guideline, open a [coding guideline issue](https://github.com/rustfoundation/safety-critical-rust-coding-guidelines/issues/new?template=CODING-GUIDELINE.yml). You'll need the FLS ID from the previous step. +3. Add a new coding guideline, open a [coding guideline issue](https://github.com/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/new?template=CODING-GUIDELINE.yml). You'll need the FLS ID from the previous step. A GitHub Action will automatically add a comment to your newly created issue with diff --git a/README.md b/README.md index 003c6e4d5..54431556e 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ rationalization checklist. ## What we're working on -The Coding Guidelines [work items board](https://github.com/orgs/rustfoundation/projects/1) shows tickets actively being worked on, and tickets you can pick up. +The Coding Guidelines [work items board](https://github.com/orgs/Safety-Critical-Rust-Consortium/projects/4) shows tickets actively being worked on, and tickets you can pick up. ## Contributing @@ -108,4 +108,4 @@ Read other Rust Foundation [policies][foundation-website]. [ip-policy]: https://foundation.rust-lang.org/policies/intellectual-property-policy/ [media-guide and trademark]: https://foundation.rust-lang.org/policies/logo-policy-and-media-guide/ [rust-foundation]: https://foundation.rust-lang.org/ -[safety-critical-rust-consortium]: https://github.com/rustfoundation/safety-critical-rust-consortium +[safety-critical-rust-consortium]: https://github.com/Safety-Critical-Rust-Consortium/safety-critical-rust-consortium diff --git a/REVIEWING.md b/REVIEWING.md index 93e19ad63..87522be2b 100644 --- a/REVIEWING.md +++ b/REVIEWING.md @@ -12,9 +12,9 @@ Before we continue, here's a preamble on how the reviewer bot helps reviewers do 1. The reviewer bot (`guidelines-bot`) automatically assigns reviewers to coding guideline issues and PRs using a round-robin system. -2. Only members marked as "Producer" in the consortium's [`members.md`](https://github.com/rustfoundation/safety-critical-rust-consortium/blob/main/subcommittee/coding-guidelines/members.md) are included in the rotation. +2. Only members marked as "Producer" in the consortium's [`members.md`](https://github.com/Safety-Critical-Rust-Consortium/safety-critical-rust-consortium/blob/main/arewesafetycriticalyet.org/docs/coding_guidelines/2_members.md) are included in the rotation. -3. The queue's state is stored in [Issue #314](https://github.com/rustfoundation/safety-critical-rust-coding-guidelines/issues/314). +3. The queue's state is stored in [Issue #314](https://github.com/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/314). 4. All commands are invoked by mentioning `@guidelines-bot` in a comment. @@ -226,7 +226,7 @@ The goal is communication, not perfection. If you need to pass or step away, jus ## Queue Status -The queue's state is stored in [Issue #314](https://github.com/rustfoundation/safety-critical-rust-coding-guidelines/issues/314) and includes: +The queue's state is stored in [Issue #314](https://github.com/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/314) and includes: - **Current queue position** - Who will be assigned next - **Active producers** - All reviewers in the rotation diff --git a/docs/issue-formatting-guide.md b/docs/issue-formatting-guide.md index 1c7a0db01..0e9198248 100644 --- a/docs/issue-formatting-guide.md +++ b/docs/issue-formatting-guide.md @@ -1,7 +1,7 @@ # Issue Formatting Guide ## Purpose -This guide outlines Markdown standards when submitting a [Coding Guideline issue template](https://github.com/rustfoundation/safety-critical-rust-coding-guidelines/issues/new?template=CODING-GUIDELINE.yml). +This guide outlines Markdown standards when submitting a [Coding Guideline issue template](https://github.com/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/new?template=CODING-GUIDELINE.yml). We follow these rules to ensure our content converts cleanly from Markdown to reStructuredText (.rst) when an Issue converted to a Pull Request. During that process the [m2r](https://pypi.org/project/m2r/) converter is used, which is then fed into Sphinx for documentation. diff --git a/scripts/README.md b/scripts/README.md index 9cc143bdb..7a838345d 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -292,7 +292,7 @@ This script transforms a GitHub issue's JSON data into reStructuredText format f cat path/to/issue.json | uv run python scripts/guideline-from-issue.py # From GitHub API directly -curl https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/123 | uv run python scripts/guideline-from-issue.py +curl https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/123 | uv run python scripts/guideline-from-issue.py # Save the output to the appropriate chapter file cat path/to/issue.json | uv run python scripts/guideline-from-issue.py --save @@ -315,7 +315,7 @@ This script generates a formatted GitHub comment containing an RST preview of a cat path/to/issue.json | uv run python scripts/generate-rst-comment.py # From GitHub API directly -curl https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/123 | uv run python scripts/generate-rst-comment.py +curl https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/123 | uv run python scripts/generate-rst-comment.py ``` ### Features @@ -338,5 +338,5 @@ curl https://api.github.com/repos/OWNER/REPO/issues/ISSUE_NUMBER > issue.json For example: ```bash -curl https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/156 > issue.json +curl https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/156 > issue.json ``` diff --git a/scripts/guideline-from-issue.py b/scripts/guideline-from-issue.py index c83b36be9..7f6980a32 100644 --- a/scripts/guideline-from-issue.py +++ b/scripts/guideline-from-issue.py @@ -37,7 +37,7 @@ args = parser.parse_args() ## locally test with `cat scripts/test_issue_sample.json | uv run python scripts/guideline-from-issue.py` - ## or use `curl https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/135 | uv run python scripts/guideline-from-issue.py` + ## or use `curl https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/135 | uv run python scripts/guideline-from-issue.py` # Read json from stdin stdin_issue_json = sys.stdin.read() diff --git a/scripts/reviewer_bot_lib/state_store.py b/scripts/reviewer_bot_lib/state_store.py index 13d951bd0..567cc1b1d 100644 --- a/scripts/reviewer_bot_lib/state_store.py +++ b/scripts/reviewer_bot_lib/state_store.py @@ -139,7 +139,7 @@ def default_state_issue_prefix() -> str: "## Reviewer Bot State\n\n" "> WARNING: DO NOT EDIT MANUALLY - This issue is automatically maintained by the reviewer bot.\n" "> Use bot commands instead (see " - "[CONTRIBUTING.md](https://github.com/rustfoundation/safety-critical-rust-coding-guidelines/blob/main/CONTRIBUTING.md) " + "[CONTRIBUTING.md](https://github.com/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/blob/main/CONTRIBUTING.md) " "for details).\n\n" "This issue tracks the round-robin assignment of reviewers for coding guidelines.\n\n" "### Current State\n\n" diff --git a/src/appendices/standards-matrices/cert-c-2016-mapping.rst b/src/appendices/standards-matrices/cert-c-2016-mapping.rst index 1b43ddee0..d7c2ffb53 100644 --- a/src/appendices/standards-matrices/cert-c-2016-mapping.rst +++ b/src/appendices/standards-matrices/cert-c-2016-mapping.rst @@ -567,7 +567,7 @@ Table 3 – Guideline rules that are not applicable to Rust bounds checks, and in the mapping of ARR30 we’re already handling that.In Unsafe Rust, doing this is to break the Safety Contract of the API we’re calling, which `is getting its own - rule. `__ + rule. `__ and is outside the mapping of this ARR38 (this rule) Recently moved out of the applicable bucket * - `STR32 `__ @@ -607,9 +607,9 @@ Table 3 – Guideline rules that are not applicable to Rust handling APIs. The implementation of those APIs in Rust is different, so the guideline doesn’t really map to it. \ *For more information, see* `this - comment `__ + comment `__ *and* `this - issue `__\ *.* + issue `__\ *.* * - `FIO44 `__ - Only use values for fsetpos() that are returned from fgetpos() - diff --git a/tests/contract/reviewer_bot/test_adapter_contract.py b/tests/contract/reviewer_bot/test_adapter_contract.py index 949582174..c27fb5388 100644 --- a/tests/contract/reviewer_bot/test_adapter_contract.py +++ b/tests/contract/reviewer_bot/test_adapter_contract.py @@ -251,8 +251,8 @@ def test_event_inputs_build_comment_request_and_pr_admission_from_runtime_config runtime.set_config_value("COMMENT_SENDER_TYPE", "User") runtime.set_config_value("COMMENT_INSTALLATION_ID", "") runtime.set_config_value("COMMENT_PERFORMED_VIA_GITHUB_APP", "false") - runtime.set_config_value("GITHUB_REPOSITORY", "rustfoundation/safety-critical-rust-coding-guidelines") - runtime.set_config_value("PR_HEAD_FULL_NAME", "rustfoundation/safety-critical-rust-coding-guidelines") + runtime.set_config_value("GITHUB_REPOSITORY", "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines") + runtime.set_config_value("PR_HEAD_FULL_NAME", "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines") runtime.set_config_value("PR_AUTHOR", "dana") runtime.set_config_value("REVIEWER_BOT_ROUTE_OUTCOME", "trusted_direct") runtime.set_config_value("REVIEWER_BOT_TRUST_CLASS", "pr_trusted_direct") @@ -270,8 +270,8 @@ def test_event_inputs_build_comment_request_and_pr_admission_from_runtime_config assert request.issue_labels == ("coding guideline",) assert request.comment_source_event_key == "issue_comment:100" assert pr_admission is not None - assert pr_admission.github_repository == "rustfoundation/safety-critical-rust-coding-guidelines" - assert pr_admission.pr_head_full_name == "rustfoundation/safety-critical-rust-coding-guidelines" + assert pr_admission.github_repository == "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines" + assert pr_admission.pr_head_full_name == "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines" assert pr_admission.pr_author == "dana" assert pr_admission.issue_state == "open" assert pr_admission.issue_labels == ("coding guideline",) @@ -327,8 +327,8 @@ def test_event_inputs_build_pr_admission_rejects_request_boundary_mismatch(monke runtime.set_config_value("COMMENT_AUTHOR_ASSOCIATION", "MEMBER") runtime.set_config_value("COMMENT_SENDER_TYPE", "User") runtime.set_config_value("COMMENT_PERFORMED_VIA_GITHUB_APP", "false") - runtime.set_config_value("GITHUB_REPOSITORY", "rustfoundation/safety-critical-rust-coding-guidelines") - runtime.set_config_value("PR_HEAD_FULL_NAME", "rustfoundation/safety-critical-rust-coding-guidelines") + runtime.set_config_value("GITHUB_REPOSITORY", "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines") + runtime.set_config_value("PR_HEAD_FULL_NAME", "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines") runtime.set_config_value("PR_AUTHOR", "dana") runtime.set_config_value("REVIEWER_BOT_ROUTE_OUTCOME", "trusted_direct") runtime.set_config_value("REVIEWER_BOT_TRUST_CLASS", "pr_trusted_direct") diff --git a/tests/contract/reviewer_bot/test_stage2_closure_artifacts.py b/tests/contract/reviewer_bot/test_stage2_closure_artifacts.py index f7268ba6c..d9e306992 100644 --- a/tests/contract/reviewer_bot/test_stage2_closure_artifacts.py +++ b/tests/contract/reviewer_bot/test_stage2_closure_artifacts.py @@ -13,7 +13,7 @@ def _load_fixture(name: str) -> dict: def _transition_notice_gate_ready(payload: dict, expected_ref: str) -> bool: return ( payload["artifact_id"] == "transition-notice-fallback-closure" - and payload["evaluated_repo"] == "rustfoundation/safety-critical-rust-coding-guidelines" + and payload["evaluated_repo"] == "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines" and payload["evaluated_ref"] == expected_ref and payload["closure_ready"] is True and payload["remaining_transition_due_without_notice"] == [] @@ -23,7 +23,7 @@ def _transition_notice_gate_ready(payload: dict, expected_ref: str) -> bool: def _deferred_payload_gate_ready(payload: dict, expected_ref: str) -> bool: return ( payload["artifact_id"] == "deferred-payload-legacy-closure" - and payload["evaluated_repo"] == "rustfoundation/safety-critical-rust-coding-guidelines" + and payload["evaluated_repo"] == "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines" and payload["evaluated_ref"] == expected_ref and payload["closure_ready"] is True and payload["retained_workflow_inventory_matches"] is True diff --git a/tests/contract/reviewer_bot/test_workflow_artifact_contracts.py b/tests/contract/reviewer_bot/test_workflow_artifact_contracts.py index 3807a7788..57bc1877f 100644 --- a/tests/contract/reviewer_bot/test_workflow_artifact_contracts.py +++ b/tests/contract/reviewer_bot/test_workflow_artifact_contracts.py @@ -155,7 +155,7 @@ def test_pr_comment_router_workflow_payload_builder_emits_parseable_contract(mon lambda _request: io.StringIO( json.dumps( { - "head": {"repo": {"full_name": "rustfoundation/safety-critical-rust-coding-guidelines"}}, + "head": {"repo": {"full_name": "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines"}}, "user": {"login": "dana"}, } ) @@ -168,7 +168,7 @@ def test_pr_comment_router_workflow_payload_builder_emits_parseable_contract(mon "PAYLOAD_PATH": str(payload_path), "GITHUB_EVENT_PATH": str(event_path), "GITHUB_OUTPUT": str(output_path), - "GITHUB_REPOSITORY": "rustfoundation/safety-critical-rust-coding-guidelines", + "GITHUB_REPOSITORY": "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", "GITHUB_RUN_ID": "401", "GITHUB_RUN_ATTEMPT": "3", "GITHUB_TOKEN": "token", @@ -375,7 +375,7 @@ def test_status_projection_preview_output_carries_standard_artifact_identity(): projection, preview_action="preview-status-label-projection", validation_nonce="nonce", - evaluated_repo="rustfoundation/safety-critical-rust-coding-guidelines", + evaluated_repo="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", head_sha="head", evaluated_ref="head", workflow_path=".github/workflows/reviewer-bot-preview.yml", @@ -411,7 +411,7 @@ def test_status_label_repair_summary_carries_standard_artifact_identity(): issue_number=264, issue_numbers=(264,), validation_nonce="nonce", - evaluated_repo="rustfoundation/safety-critical-rust-coding-guidelines", + evaluated_repo="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", head_sha="head", evaluated_ref="head", workflow_path=".github/workflows/reviewer-bot-sweeper-repair.yml", @@ -459,7 +459,7 @@ def test_issue314_preview_and_repair_outputs_carry_standard_artifact_identity(): state_save_attempted=False, tracked_state_mutations_attempted=False, touched_projection_attempted=False, - evaluated_repo="rustfoundation/safety-critical-rust-coding-guidelines", + evaluated_repo="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", head_sha="head", evaluated_ref="head", workflow_path=".github/workflows/reviewer-bot-preview.yml", @@ -485,7 +485,7 @@ def test_issue314_preview_and_repair_outputs_carry_standard_artifact_identity(): reviewer_facing_reminder_posts_attempted=0, manual_issue314_edit_status="not_attempted", state_store_mutation_mode="not_required", - evaluated_repo="rustfoundation/safety-critical-rust-coding-guidelines", + evaluated_repo="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", head_sha="head", evaluated_ref="head", workflow_path=".github/workflows/reviewer-bot-sweeper-repair.yml", diff --git a/tests/contract/reviewer_bot/test_workflow_files.py b/tests/contract/reviewer_bot/test_workflow_files.py index 21fcbffb7..6b3fdd876 100644 --- a/tests/contract/reviewer_bot/test_workflow_files.py +++ b/tests/contract/reviewer_bot/test_workflow_files.py @@ -195,7 +195,7 @@ def test_pr_comment_router_performed_via_app_helper_executes_source_shape_cases( "installation_id": None, "performed_via_app": False, "comment_author_association": "MEMBER", - "pr_head_full_name": "rustfoundation/safety-critical-rust-coding-guidelines", + "pr_head_full_name": "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", "pr_author": "carol", "route_outcome": comment_routing_policy.PrCommentRouterOutcome.TRUSTED_DIRECT, "expected_outcome": comment_routing_policy.PrCommentRouterOutcome.TRUSTED_DIRECT, @@ -208,7 +208,7 @@ def test_pr_comment_router_performed_via_app_helper_executes_source_shape_cases( "installation_id": None, "performed_via_app": False, "comment_author_association": "contributor", - "pr_head_full_name": "rustfoundation/safety-critical-rust-coding-guidelines", + "pr_head_full_name": "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", "pr_author": "carol", "route_outcome": comment_routing_policy.PrCommentRouterOutcome.TRUSTED_DIRECT, "expected_outcome": comment_routing_policy.PrCommentRouterOutcome.DEFERRED_RECONCILE, @@ -234,7 +234,7 @@ def test_pr_comment_router_performed_via_app_helper_executes_source_shape_cases( "installation_id": None, "performed_via_app": False, "comment_author_association": "OWNER", - "pr_head_full_name": "rustfoundation/safety-critical-rust-coding-guidelines", + "pr_head_full_name": "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", "pr_author": "dependabot[bot]", "route_outcome": comment_routing_policy.PrCommentRouterOutcome.TRUSTED_DIRECT, "expected_outcome": comment_routing_policy.PrCommentRouterOutcome.DEFERRED_RECONCILE, @@ -247,7 +247,7 @@ def test_pr_comment_router_performed_via_app_helper_executes_source_shape_cases( "installation_id": None, "performed_via_app": False, "comment_author_association": "MEMBER", - "pr_head_full_name": "rustfoundation/safety-critical-rust-coding-guidelines", + "pr_head_full_name": "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", "pr_author": "carol", "route_outcome": comment_routing_policy.PrCommentRouterOutcome.TRUSTED_DIRECT, "expected_outcome": comment_routing_policy.PrCommentRouterOutcome.SAFE_NOOP, @@ -274,7 +274,7 @@ def test_pr_comment_router_performed_via_app_helper_executes_source_shape_cases( "installation_id": None, "performed_via_app": False, "comment_author_association": "MEMBER", - "pr_head_full_name": "rustfoundation/safety-critical-rust-coding-guidelines", + "pr_head_full_name": "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", "pr_author": "carol", "is_self_comment": True, "route_outcome": comment_routing_policy.PrCommentRouterOutcome.TRUSTED_DIRECT, @@ -284,7 +284,7 @@ def test_pr_comment_router_performed_via_app_helper_executes_source_shape_cases( ids=lambda scenario: scenario["name"], ) def test_pr_comment_router_core_policy_covers_workflow_route_outcomes(scenario): - repo = "rustfoundation/safety-critical-rust-coding-guidelines" + repo = "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines" request = SimpleNamespace( is_pull_request=True, comment_user_type=scenario["comment_user_type"], diff --git a/tests/fixtures/reviewer_bot_sweeper_builders.py b/tests/fixtures/reviewer_bot_sweeper_builders.py index 2925a659f..42fdfc2f3 100644 --- a/tests/fixtures/reviewer_bot_sweeper_builders.py +++ b/tests/fixtures/reviewer_bot_sweeper_builders.py @@ -68,7 +68,7 @@ def workflow_run( event: str, path: str, created_at: str, - repo_full_name: str = "rustfoundation/safety-critical-rust-coding-guidelines", + repo_full_name: str = "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", pr_number: int | None = 42, status: str | None = None, conclusion: str | None = None, diff --git a/tests/fixtures/workflow_contracts/stage2_deferred_payload_legacy_closure_blocked.json b/tests/fixtures/workflow_contracts/stage2_deferred_payload_legacy_closure_blocked.json index a1f362928..b0db9ddc6 100644 --- a/tests/fixtures/workflow_contracts/stage2_deferred_payload_legacy_closure_blocked.json +++ b/tests/fixtures/workflow_contracts/stage2_deferred_payload_legacy_closure_blocked.json @@ -1,7 +1,7 @@ { "artifact_id": "deferred-payload-legacy-closure", "generated_at": "2026-04-13T18:00:00Z", - "evaluated_repo": "rustfoundation/safety-critical-rust-coding-guidelines", + "evaluated_repo": "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", "evaluated_ref": "c158011fd015a27ad5d0cac06675fb2d01276362", "closure_ready": false, "retained_workflow_inventory_matches": false, @@ -38,6 +38,6 @@ ], "control_plane_actions_applied": [], "commands_run": [ - "gh workflow list --repo rustfoundation/safety-critical-rust-coding-guidelines" + "gh workflow list --repo Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines" ] } diff --git a/tests/fixtures/workflow_contracts/stage2_deferred_payload_legacy_closure_green.json b/tests/fixtures/workflow_contracts/stage2_deferred_payload_legacy_closure_green.json index 68f7961c1..a12047122 100644 --- a/tests/fixtures/workflow_contracts/stage2_deferred_payload_legacy_closure_green.json +++ b/tests/fixtures/workflow_contracts/stage2_deferred_payload_legacy_closure_green.json @@ -1,7 +1,7 @@ { "artifact_id": "deferred-payload-legacy-closure", "generated_at": "2026-04-13T18:00:00Z", - "evaluated_repo": "rustfoundation/safety-critical-rust-coding-guidelines", + "evaluated_repo": "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", "evaluated_ref": "c158011fd015a27ad5d0cac06675fb2d01276362", "closure_ready": true, "retained_workflow_inventory_matches": true, @@ -13,7 +13,7 @@ "delete legacy deferred artifact" ], "commands_run": [ - "gh workflow list --repo rustfoundation/safety-critical-rust-coding-guidelines", - "gh run list --repo rustfoundation/safety-critical-rust-coding-guidelines --workflow \"Reviewer Bot PR Comment Router\"" + "gh workflow list --repo Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", + "gh run list --repo Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines --workflow \"Reviewer Bot PR Comment Router\"" ] } diff --git a/tests/fixtures/workflow_contracts/stage2_transition_notice_fallback_closure_blocked.json b/tests/fixtures/workflow_contracts/stage2_transition_notice_fallback_closure_blocked.json index c7e501009..e2599518f 100644 --- a/tests/fixtures/workflow_contracts/stage2_transition_notice_fallback_closure_blocked.json +++ b/tests/fixtures/workflow_contracts/stage2_transition_notice_fallback_closure_blocked.json @@ -1,7 +1,7 @@ { "artifact_id": "transition-notice-fallback-closure", "generated_at": "2026-04-13T18:00:00Z", - "evaluated_repo": "rustfoundation/safety-critical-rust-coding-guidelines", + "evaluated_repo": "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", "evaluated_ref": "c158011fd015a27ad5d0cac06675fb2d01276362", "state_issue_number": 314, "closure_ready": false, @@ -17,6 +17,6 @@ } ], "commands_run": [ - "gh workflow run reviewer-bot-sweeper-repair.yml --repo rustfoundation/safety-critical-rust-coding-guidelines --ref main -f action=check-overdue" + "gh workflow run reviewer-bot-sweeper-repair.yml --repo Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines --ref main -f action=check-overdue" ] } diff --git a/tests/fixtures/workflow_contracts/stage2_transition_notice_fallback_closure_green.json b/tests/fixtures/workflow_contracts/stage2_transition_notice_fallback_closure_green.json index 2ddcfc95c..84d6caad3 100644 --- a/tests/fixtures/workflow_contracts/stage2_transition_notice_fallback_closure_green.json +++ b/tests/fixtures/workflow_contracts/stage2_transition_notice_fallback_closure_green.json @@ -1,7 +1,7 @@ { "artifact_id": "transition-notice-fallback-closure", "generated_at": "2026-04-13T18:00:00Z", - "evaluated_repo": "rustfoundation/safety-critical-rust-coding-guidelines", + "evaluated_repo": "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", "evaluated_ref": "c158011fd015a27ad5d0cac06675fb2d01276362", "state_issue_number": 314, "closure_ready": true, @@ -23,7 +23,7 @@ ], "remaining_transition_due_without_notice": [], "commands_run": [ - "gh workflow run reviewer-bot-sweeper-repair.yml --repo rustfoundation/safety-critical-rust-coding-guidelines --ref main -f action=check-overdue", - "gh workflow run reviewer-bot-sweeper-repair.yml --repo rustfoundation/safety-critical-rust-coding-guidelines --ref main -f action=repair-review-status-labels" + "gh workflow run reviewer-bot-sweeper-repair.yml --repo Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines --ref main -f action=check-overdue", + "gh workflow run reviewer-bot-sweeper-repair.yml --repo Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines --ref main -f action=repair-review-status-labels" ] } diff --git a/tests/integration/reviewer_bot/test_app_closed_issue_cleanup.py b/tests/integration/reviewer_bot/test_app_closed_issue_cleanup.py index c85cb9a18..a8252f555 100644 --- a/tests/integration/reviewer_bot/test_app_closed_issue_cleanup.py +++ b/tests/integration/reviewer_bot/test_app_closed_issue_cleanup.py @@ -113,8 +113,8 @@ def test_execute_run_closed_pr_comment_safe_noop_does_not_save_or_project(monkey COMMENT_PERFORMED_VIA_GITHUB_APP="false", REVIEWER_BOT_ROUTE_OUTCOME="trusted_direct", REVIEWER_BOT_TRUST_CLASS="pr_trusted_direct", - GITHUB_REPOSITORY="rustfoundation/safety-critical-rust-coding-guidelines", - PR_HEAD_FULL_NAME="rustfoundation/safety-critical-rust-coding-guidelines", + GITHUB_REPOSITORY="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", + PR_HEAD_FULL_NAME="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", PR_AUTHOR="dana", GITHUB_RUN_ID="123", GITHUB_RUN_ATTEMPT="1", diff --git a/tests/integration/reviewer_bot/test_app_execution.py b/tests/integration/reviewer_bot/test_app_execution.py index b335f669d..7431021e9 100644 --- a/tests/integration/reviewer_bot/test_app_execution.py +++ b/tests/integration/reviewer_bot/test_app_execution.py @@ -766,7 +766,7 @@ def test_bootstrapped_runtime_workflow_dispatch_repair_status_labels_uses_real_p monkeypatch.setenv("EVENT_ACTION", "") monkeypatch.setenv("MANUAL_ACTION", "repair-review-status-labels") monkeypatch.setenv("VALIDATION_NONCE", "repair-nonce") - monkeypatch.setenv("GITHUB_REPOSITORY", "rustfoundation/safety-critical-rust-coding-guidelines") + monkeypatch.setenv("GITHUB_REPOSITORY", "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines") monkeypatch.setenv("GITHUB_RUN_ID", "9001") monkeypatch.setenv("GITHUB_RUN_ATTEMPT", "1") monkeypatch.setenv("GITHUB_SHA", "workflow-head") diff --git a/tests/integration/reviewer_bot/test_app_preview_issue314_state_health.py b/tests/integration/reviewer_bot/test_app_preview_issue314_state_health.py index 7ece42f85..8002b6b5b 100644 --- a/tests/integration/reviewer_bot/test_app_preview_issue314_state_health.py +++ b/tests/integration/reviewer_bot/test_app_preview_issue314_state_health.py @@ -31,7 +31,7 @@ def test_execute_run_preview_issue314_state_health_is_read_only_and_inspects_act ISSUE_NUMBER=314, VALIDATION_NONCE="nonce-issue314-preview", GITHUB_SHA="workflow-head", - GITHUB_REPOSITORY="rustfoundation/safety-critical-rust-coding-guidelines", + GITHUB_REPOSITORY="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", GITHUB_RUN_ID="999", GITHUB_RUN_ATTEMPT="4", STATE_ISSUE_NUMBER=314, @@ -163,7 +163,7 @@ def test_execute_run_preview_issue314_state_health_blocks_unavailable_live_rows( ISSUE_NUMBER=314, VALIDATION_NONCE="nonce-issue314-preview", GITHUB_SHA="workflow-head", - GITHUB_REPOSITORY="rustfoundation/safety-critical-rust-coding-guidelines", + GITHUB_REPOSITORY="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", GITHUB_RUN_ID="1000", GITHUB_RUN_ATTEMPT="1", STATE_ISSUE_NUMBER=314, @@ -218,7 +218,7 @@ def test_execute_run_preview_issue314_state_health_keeps_aligned_awaiting_review ISSUE_NUMBER=314, VALIDATION_NONCE="nonce-issue314-preview", GITHUB_SHA="workflow-head", - GITHUB_REPOSITORY="rustfoundation/safety-critical-rust-coding-guidelines", + GITHUB_REPOSITORY="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", GITHUB_RUN_ID="1001", GITHUB_RUN_ATTEMPT="1", STATE_ISSUE_NUMBER=314, diff --git a/tests/integration/reviewer_bot/test_app_preview_overdue.py b/tests/integration/reviewer_bot/test_app_preview_overdue.py index d36bceb5e..e3eb18475 100644 --- a/tests/integration/reviewer_bot/test_app_preview_overdue.py +++ b/tests/integration/reviewer_bot/test_app_preview_overdue.py @@ -31,7 +31,7 @@ def test_execute_run_preview_check_overdue_uses_frozen_pr264_operational_project ISSUE_NUMBER=264, VALIDATION_NONCE="nonce-pr264", GITHUB_SHA="workflow-head", - GITHUB_REPOSITORY="rustfoundation/safety-critical-rust-coding-guidelines", + GITHUB_REPOSITORY="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", GITHUB_RUN_ID="777", GITHUB_RUN_ATTEMPT="2", ) @@ -128,7 +128,7 @@ def test_execute_run_preview_check_overdue_uses_frozen_pr264_operational_project assert payload["preview_action"] == "preview-check-overdue" assert payload["issue_number"] == 264 assert payload["validation_nonce"] == "nonce-pr264" - assert payload["evaluated_repo"] == "rustfoundation/safety-critical-rust-coding-guidelines" + assert payload["evaluated_repo"] == "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines" assert payload["head_sha"] == "workflow-head" assert payload["evaluated_ref"] == "workflow-head" assert payload["workflow_path"] == ".github/workflows/reviewer-bot-preview.yml" diff --git a/tests/integration/reviewer_bot/test_app_preview_status_label_projection.py b/tests/integration/reviewer_bot/test_app_preview_status_label_projection.py index 0d893465b..8d37a4b16 100644 --- a/tests/integration/reviewer_bot/test_app_preview_status_label_projection.py +++ b/tests/integration/reviewer_bot/test_app_preview_status_label_projection.py @@ -28,7 +28,7 @@ def test_execute_run_preview_status_label_projection_is_read_only_pr264_contract ISSUE_NUMBER=264, VALIDATION_NONCE="nonce-pr264-projection", GITHUB_SHA="workflow-head", - GITHUB_REPOSITORY="rustfoundation/safety-critical-rust-coding-guidelines", + GITHUB_REPOSITORY="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", GITHUB_RUN_ID="777", GITHUB_RUN_ATTEMPT="2", ) diff --git a/tests/integration/reviewer_bot/test_app_repair_issue314_state_health.py b/tests/integration/reviewer_bot/test_app_repair_issue314_state_health.py index 74cb1124d..14958795c 100644 --- a/tests/integration/reviewer_bot/test_app_repair_issue314_state_health.py +++ b/tests/integration/reviewer_bot/test_app_repair_issue314_state_health.py @@ -23,7 +23,7 @@ def test_execute_run_repair_issue314_state_health_removes_closed_rows_through_st ISSUE_NUMBER=314, VALIDATION_NONCE="nonce-issue314-repair", GITHUB_SHA="workflow-head", - GITHUB_REPOSITORY="rustfoundation/safety-critical-rust-coding-guidelines", + GITHUB_REPOSITORY="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", GITHUB_RUN_ID="1001", GITHUB_RUN_ATTEMPT="5", STATE_ISSUE_NUMBER=314, @@ -100,7 +100,7 @@ def test_execute_run_repair_issue314_state_health_emits_summary_only_after_state ISSUE_NUMBER=314, VALIDATION_NONCE="nonce-issue314-repair", GITHUB_SHA="workflow-head", - GITHUB_REPOSITORY="rustfoundation/safety-critical-rust-coding-guidelines", + GITHUB_REPOSITORY="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", GITHUB_RUN_ID="1002", GITHUB_RUN_ATTEMPT="1", STATE_ISSUE_NUMBER=314, @@ -148,7 +148,7 @@ def test_execute_run_repair_issue314_state_health_requires_identity(monkeypatch, ISSUE_NUMBER=314, VALIDATION_NONCE="", GITHUB_SHA="workflow-head", - GITHUB_REPOSITORY="rustfoundation/safety-critical-rust-coding-guidelines", + GITHUB_REPOSITORY="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", GITHUB_RUN_ID="1003", GITHUB_RUN_ATTEMPT="1", STATE_ISSUE_NUMBER=314, @@ -177,7 +177,7 @@ def test_execute_run_repair_issue314_state_health_repairs_awaiting_reviewer_labe ISSUE_NUMBER=314, VALIDATION_NONCE="nonce-issue314-repair", GITHUB_SHA="workflow-head", - GITHUB_REPOSITORY="rustfoundation/safety-critical-rust-coding-guidelines", + GITHUB_REPOSITORY="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", GITHUB_RUN_ID="1004", GITHUB_RUN_ATTEMPT="1", STATE_ISSUE_NUMBER=314, diff --git a/tests/integration/reviewer_bot/test_app_repair_status_labels.py b/tests/integration/reviewer_bot/test_app_repair_status_labels.py index 35a992773..c9ce73603 100644 --- a/tests/integration/reviewer_bot/test_app_repair_status_labels.py +++ b/tests/integration/reviewer_bot/test_app_repair_status_labels.py @@ -29,7 +29,7 @@ def test_execute_run_targeted_status_label_repair_does_not_broaden_epoch_repair( ISSUE_NUMBER=264, VALIDATION_NONCE="nonce-pr264-repair", GITHUB_SHA="workflow-head", - GITHUB_REPOSITORY="rustfoundation/safety-critical-rust-coding-guidelines", + GITHUB_REPOSITORY="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", GITHUB_RUN_ID="888", GITHUB_RUN_ATTEMPT="3", ) @@ -155,7 +155,7 @@ def test_execute_run_targeted_status_label_repair_fails_closed_without_summary( ISSUE_NUMBER=264, VALIDATION_NONCE="nonce-pr264-repair", GITHUB_SHA="workflow-head", - GITHUB_REPOSITORY="rustfoundation/safety-critical-rust-coding-guidelines", + GITHUB_REPOSITORY="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", GITHUB_RUN_ID="889", GITHUB_RUN_ATTEMPT="1", ) diff --git a/tests/integration/reviewer_bot/test_app_reviewer_board_preview.py b/tests/integration/reviewer_bot/test_app_reviewer_board_preview.py index e1dedb79a..0f07abcd1 100644 --- a/tests/integration/reviewer_bot/test_app_reviewer_board_preview.py +++ b/tests/integration/reviewer_bot/test_app_reviewer_board_preview.py @@ -180,7 +180,7 @@ def test_execute_run_preview_reviewer_board_keeps_pr264_alternate_approval_proje ISSUE_NUMBER=264, VALIDATION_NONCE="board-preview-pr264", GITHUB_SHA="workflow-head", - GITHUB_REPOSITORY="rustfoundation/safety-critical-rust-coding-guidelines", + GITHUB_REPOSITORY="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", GITHUB_RUN_ID="1004", GITHUB_RUN_ATTEMPT="1", ) @@ -240,7 +240,7 @@ def test_execute_run_preview_reviewer_board_keeps_pr264_alternate_approval_proje assert payload["preview_action"] == "preview-reviewer-board" assert payload["issue_number"] == 264 assert payload["validation_nonce"] == "board-preview-pr264" - assert payload["evaluated_repo"] == "rustfoundation/safety-critical-rust-coding-guidelines" + assert payload["evaluated_repo"] == "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines" assert payload["head_sha"] == "workflow-head" assert payload["evaluated_ref"] == "workflow-head" assert payload["workflow_path"] == ".github/workflows/reviewer-bot-preview.yml" diff --git a/tests/integration/reviewer_bot/test_comment_routing_integration.py b/tests/integration/reviewer_bot/test_comment_routing_integration.py index d1dccf385..2d0496665 100644 --- a/tests/integration/reviewer_bot/test_comment_routing_integration.py +++ b/tests/integration/reviewer_bot/test_comment_routing_integration.py @@ -135,7 +135,7 @@ def test_cross_repo_pr_comment_route_remains_deferred_not_direct(monkeypatch): ) trust_context = harness.trust_context( route_outcome=comment_routing.comment_routing_policy.PrCommentRouterOutcome.DEFERRED_RECONCILE, - github_repository="rustfoundation/safety-critical-rust-coding-guidelines", + github_repository="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", pr_head_full_name="fork/example", pr_author="dana", ) diff --git a/tests/unit/reviewer_bot/test_commands.py b/tests/unit/reviewer_bot/test_commands.py index 4dcaea3da..9980a321c 100644 --- a/tests/unit/reviewer_bot/test_commands.py +++ b/tests/unit/reviewer_bot/test_commands.py @@ -91,11 +91,11 @@ def test_label_signoff_create_pr_on_pr_does_not_mark_issue_complete(monkeypatch) trust_context = harness.typed_trust_context( author_association="MEMBER", workflow_file=".github/workflows/reviewer-bot-pr-comment-router.yml", - repository="rustfoundation/safety-critical-rust-coding-guidelines", + repository="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", ref="refs/heads/main", ) harness.runtime.github_api = lambda method, endpoint, data=None: { - "head": {"repo": {"full_name": "rustfoundation/safety-critical-rust-coding-guidelines"}}, + "head": {"repo": {"full_name": "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines"}}, "user": {"login": "dana"}, "pull_request": {}, } diff --git a/tests/unit/reviewer_bot/test_comment_routing.py b/tests/unit/reviewer_bot/test_comment_routing.py index e11d97846..4b8b22689 100644 --- a/tests/unit/reviewer_bot/test_comment_routing.py +++ b/tests/unit/reviewer_bot/test_comment_routing.py @@ -104,8 +104,8 @@ def test_route_issue_comment_trust_allows_only_same_repo_repo_user_principal(mon comment_body="hello", ) pr_admission = harness.pr_admission( - github_repository="rustfoundation/safety-critical-rust-coding-guidelines", - pr_head_full_name="rustfoundation/safety-critical-rust-coding-guidelines", + github_repository="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", + pr_head_full_name="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", pr_author="carol", ) assert comment_routing.route_issue_comment_trust(harness.runtime, 42, request, pr_admission) == PrCommentRouterOutcome.TRUSTED_DIRECT @@ -122,8 +122,8 @@ def test_route_issue_comment_trust_defers_untrusted_author_association(monkeypat comment_author_association="CONTRIBUTOR", ) pr_admission = harness.pr_admission( - github_repository="rustfoundation/safety-critical-rust-coding-guidelines", - pr_head_full_name="rustfoundation/safety-critical-rust-coding-guidelines", + github_repository="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", + pr_head_full_name="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", pr_author="carol", ) @@ -141,8 +141,8 @@ def test_route_issue_comment_trust_fails_closed_for_ambiguous_same_repo(monkeypa comment_user_type="", ) pr_admission = harness.pr_admission( - github_repository="rustfoundation/safety-critical-rust-coding-guidelines", - pr_head_full_name="rustfoundation/safety-critical-rust-coding-guidelines", + github_repository="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", + pr_head_full_name="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", pr_author="carol", ) with pytest.raises(RuntimeError, match="Ambiguous same-repo PR comment trust posture"): diff --git a/tests/unit/reviewer_bot/test_comment_routing_equivalence.py b/tests/unit/reviewer_bot/test_comment_routing_equivalence.py index 69c77839f..3dc888bb6 100644 --- a/tests/unit/reviewer_bot/test_comment_routing_equivalence.py +++ b/tests/unit/reviewer_bot/test_comment_routing_equivalence.py @@ -124,8 +124,8 @@ def test_route_outcome_equivalence_covers_trusted_deferred_noop_and_issue_direct ), "trust_context": harness.trust_context( route_outcome=comment_routing_policy.PrCommentRouterOutcome.TRUSTED_DIRECT, - github_repository="rustfoundation/safety-critical-rust-coding-guidelines", - pr_head_full_name="rustfoundation/safety-critical-rust-coding-guidelines", + github_repository="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", + pr_head_full_name="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", pr_author="carol", ), }, @@ -142,8 +142,8 @@ def test_route_outcome_equivalence_covers_trusted_deferred_noop_and_issue_direct ), "trust_context": harness.trust_context( route_outcome=comment_routing_policy.PrCommentRouterOutcome.TRUSTED_DIRECT, - github_repository="rustfoundation/safety-critical-rust-coding-guidelines", - pr_head_full_name="rustfoundation/safety-critical-rust-coding-guidelines", + github_repository="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", + pr_head_full_name="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", pr_author="carol", ), }, @@ -159,7 +159,7 @@ def test_route_outcome_equivalence_covers_trusted_deferred_noop_and_issue_direct ), "trust_context": harness.trust_context( route_outcome=comment_routing_policy.PrCommentRouterOutcome.DEFERRED_RECONCILE, - github_repository="rustfoundation/safety-critical-rust-coding-guidelines", + github_repository="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", pr_head_full_name="fork/example", pr_author="carol", ), @@ -176,8 +176,8 @@ def test_route_outcome_equivalence_covers_trusted_deferred_noop_and_issue_direct ), "trust_context": harness.trust_context( route_outcome=comment_routing_policy.PrCommentRouterOutcome.SAFE_NOOP, - github_repository="rustfoundation/safety-critical-rust-coding-guidelines", - pr_head_full_name="rustfoundation/safety-critical-rust-coding-guidelines", + github_repository="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", + pr_head_full_name="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", pr_author="carol", ), }, @@ -192,7 +192,7 @@ def test_route_outcome_equivalence_covers_trusted_deferred_noop_and_issue_direct comment_user_type="User", ), "trust_context": harness.trust_context( - github_repository="rustfoundation/safety-critical-rust-coding-guidelines", + github_repository="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", ), }, ] diff --git a/tests/unit/reviewer_bot/test_comment_routing_policy.py b/tests/unit/reviewer_bot/test_comment_routing_policy.py index 1bf703e2f..5fb5adf1b 100644 --- a/tests/unit/reviewer_bot/test_comment_routing_policy.py +++ b/tests/unit/reviewer_bot/test_comment_routing_policy.py @@ -20,7 +20,7 @@ def test_ambiguous_cross_repo_pr_comment_fails_to_deferred_lane(): admission = PrCommentAdmission( route_outcome=PrCommentRouterOutcome.TRUSTED_DIRECT, declared_trust_class="pr_trusted_direct", - github_repository="rustfoundation/safety-critical-rust-coding-guidelines", + github_repository="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", pr_head_full_name="fork/repo", pr_author="contributor", issue_state="open", diff --git a/tests/unit/reviewer_bot/test_fixture_contracts.py b/tests/unit/reviewer_bot/test_fixture_contracts.py index 8fc20cc90..5b3feadfe 100644 --- a/tests/unit/reviewer_bot/test_fixture_contracts.py +++ b/tests/unit/reviewer_bot/test_fixture_contracts.py @@ -95,7 +95,7 @@ def test_rest_transport_stub_routes_repo_urls_through_github_stub(): github = GitHubStub(RouteGitHubApi().add_request("GET", "issues/42", result=github_result(200, {"ok": True}))) transport = RestTransportStub(github) - response = transport.request("GET", "https://api.github.com/repos/rustfoundation/safety-critical-rust-coding-guidelines/issues/42") + response = transport.request("GET", "https://api.github.com/repos/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/42") assert response.status_code == 200 assert response.json() == {"ok": True} diff --git a/tests/unit/reviewer_bot/test_issue314_state_health.py b/tests/unit/reviewer_bot/test_issue314_state_health.py index cd5cef26f..c51003c11 100644 --- a/tests/unit/reviewer_bot/test_issue314_state_health.py +++ b/tests/unit/reviewer_bot/test_issue314_state_health.py @@ -59,7 +59,7 @@ def _repair_summary(**overrides): "reviewer_facing_reminder_posts_attempted": 0, "manual_issue314_edit_status": "not_attempted", "state_store_mutation_mode": "not_required", - "evaluated_repo": "rustfoundation/safety-critical-rust-coding-guidelines", + "evaluated_repo": "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", "head_sha": "head", "evaluated_ref": "head", "workflow_path": ".github/workflows/reviewer-bot-sweeper-repair.yml", @@ -123,7 +123,7 @@ def test_issue314_classifier_marks_pr264_stale_label_as_operator_action_without_ reviewer_responses={264: decision}, status_projections={264: projection}, reminder_scans={264: scan}, - evaluated_repo="rustfoundation/safety-critical-rust-coding-guidelines", + evaluated_repo="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", head_sha="head", evaluated_ref="head", workflow_path=".github/workflows/reviewer-bot-preview.yml", @@ -175,7 +175,7 @@ def test_issue314_classifier_blocks_pr264_handoff_when_projection_truth_is_incom reviewer_responses={264: decision}, status_projections={264: projection}, reminder_scans={264: scan_reviewer_reminder_comments([])}, - evaluated_repo="rustfoundation/safety-critical-rust-coding-guidelines", + evaluated_repo="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", head_sha="head", evaluated_ref="head", workflow_path=".github/workflows/reviewer-bot-preview.yml", @@ -215,7 +215,7 @@ def test_issue314_classifier_keeps_aligned_awaiting_reviewer_response_healthy(): reviewer_responses={42: decision}, status_projections={42: projection}, reminder_scans={42: scan_reviewer_reminder_comments([])}, - evaluated_repo="rustfoundation/safety-critical-rust-coding-guidelines", + evaluated_repo="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", head_sha="head", evaluated_ref="head", workflow_path=".github/workflows/reviewer-bot-preview.yml", @@ -256,7 +256,7 @@ def test_issue314_classifier_marks_awaiting_reviewer_response_label_drift_repair reviewer_responses={360: decision}, status_projections={360: projection}, reminder_scans={360: scan_reviewer_reminder_comments([])}, - evaluated_repo="rustfoundation/safety-critical-rust-coding-guidelines", + evaluated_repo="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", head_sha="head", evaluated_ref="head", workflow_path=".github/workflows/reviewer-bot-preview.yml", @@ -296,7 +296,7 @@ def test_issue314_classifier_blocks_contradictory_non_remindable_response(): reviewer_responses={42: decision}, status_projections={42: projection}, reminder_scans={42: scan_reviewer_reminder_comments([])}, - evaluated_repo="rustfoundation/safety-critical-rust-coding-guidelines", + evaluated_repo="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", head_sha="head", evaluated_ref="head", workflow_path=".github/workflows/reviewer-bot-preview.yml", @@ -329,7 +329,7 @@ def test_issue314_repair_summary_writer_requires_artifact_path(monkeypatch): reviewer_facing_reminder_posts_attempted=0, manual_issue314_edit_status="not_attempted", state_store_mutation_mode="not_required", - evaluated_repo="rustfoundation/safety-critical-rust-coding-guidelines", + evaluated_repo="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", head_sha="head", evaluated_ref="head", workflow_path=".github/workflows/reviewer-bot-sweeper-repair.yml", @@ -385,7 +385,7 @@ def test_issue314_repair_summary_writer_emits_identity_fields(monkeypatch, tmp_p reviewer_facing_reminder_posts_attempted=0, manual_issue314_edit_status="not_attempted", state_store_mutation_mode="not_required", - evaluated_repo="rustfoundation/safety-critical-rust-coding-guidelines", + evaluated_repo="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", head_sha="head", evaluated_ref="head", workflow_path=".github/workflows/reviewer-bot-sweeper-repair.yml", diff --git a/tests/unit/reviewer_bot/test_lifecycle.py b/tests/unit/reviewer_bot/test_lifecycle.py index 6de192dba..7f7b94373 100644 --- a/tests/unit/reviewer_bot/test_lifecycle.py +++ b/tests/unit/reviewer_bot/test_lifecycle.py @@ -59,14 +59,14 @@ def test_pr_comment_direct_path_is_epoch_gated(monkeypatch): comment_body="hello", ) trust_context = harness.trust_context( - github_repository="rustfoundation/safety-critical-rust-coding-guidelines", + github_repository="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", comment_author_association="MEMBER", current_workflow_file=".github/workflows/reviewer-bot-pr-comment-router.yml", github_ref="refs/heads/main", ) harness.add_pull_request_metadata( issue_number=42, - head_repo_full_name="rustfoundation/safety-critical-rust-coding-guidelines", + head_repo_full_name="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", pr_author="dana", ) @@ -169,14 +169,14 @@ def test_plain_reviewer_comment_does_not_clear_warning_or_transition_notice(monk comment_body="hello", ) trust_context = harness.trust_context( - github_repository="rustfoundation/safety-critical-rust-coding-guidelines", + github_repository="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", comment_author_association="MEMBER", current_workflow_file=".github/workflows/reviewer-bot-pr-comment-router.yml", github_ref="refs/heads/main", ) harness.add_pull_request_metadata( issue_number=42, - head_repo_full_name="rustfoundation/safety-critical-rust-coding-guidelines", + head_repo_full_name="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", pr_author="dana", ) harness.runtime.github.get_issue_assignees = lambda issue_number, is_pull_request=None: ["alice"] @@ -202,14 +202,14 @@ def test_reviewer_comment_does_not_count_as_reviewer_activity_when_live_assignee comment_body="hello", ) trust_context = harness.trust_context( - github_repository="rustfoundation/safety-critical-rust-coding-guidelines", + github_repository="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", comment_author_association="MEMBER", current_workflow_file=".github/workflows/reviewer-bot-pr-comment-router.yml", github_ref="refs/heads/main", ) harness.add_pull_request_metadata( issue_number=42, - head_repo_full_name="rustfoundation/safety-critical-rust-coding-guidelines", + head_repo_full_name="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", pr_author="dana", ) harness.runtime.github.get_issue_assignees = lambda issue_number, is_pull_request=None: ["bob"] diff --git a/tests/unit/reviewer_bot/test_maintenance.py b/tests/unit/reviewer_bot/test_maintenance.py index 77dd9831b..10bea2a57 100644 --- a/tests/unit/reviewer_bot/test_maintenance.py +++ b/tests/unit/reviewer_bot/test_maintenance.py @@ -195,7 +195,7 @@ def test_targeted_status_label_repair_policy_and_collection_do_not_broaden(monke action="repair-review-status-labels", issue_number=264, validation_nonce="nonce", - evaluated_repo="rustfoundation/safety-critical-rust-coding-guidelines", + evaluated_repo="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", head_sha="head", evaluated_ref="head", workflow_path=".github/workflows/reviewer-bot-sweeper-repair.yml", @@ -223,7 +223,7 @@ def test_broad_status_label_repair_collection_is_explicit(monkeypatch): action="repair-review-status-labels", issue_number=None, validation_nonce="nonce", - evaluated_repo="rustfoundation/safety-critical-rust-coding-guidelines", + evaluated_repo="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", head_sha="head", evaluated_ref="head", workflow_path=".github/workflows/reviewer-bot-sweeper-repair.yml", @@ -252,7 +252,7 @@ def test_status_label_repair_summary_writes_machine_readable_artifact(monkeypatc issue_number=264, issue_numbers=(264,), validation_nonce="nonce", - evaluated_repo="rustfoundation/safety-critical-rust-coding-guidelines", + evaluated_repo="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", head_sha="head", evaluated_ref="head", workflow_path=".github/workflows/reviewer-bot-sweeper-repair.yml", diff --git a/tests/unit/reviewer_bot/test_reviews_projection.py b/tests/unit/reviewer_bot/test_reviews_projection.py index 679b9a5d3..d6157d828 100644 --- a/tests/unit/reviewer_bot/test_reviews_projection.py +++ b/tests/unit/reviewer_bot/test_reviews_projection.py @@ -336,7 +336,7 @@ def test_status_projection_maps_reassignment_needed_and_exposes_decision_output( result, preview_action="preview-status-label-projection", validation_nonce="nonce", - evaluated_repo="rustfoundation/safety-critical-rust-coding-guidelines", + evaluated_repo="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", head_sha="head", evaluated_ref="head", workflow_path=".github/workflows/reviewer-bot-preview.yml", diff --git a/tests/unit/reviewer_bot/test_state_store.py b/tests/unit/reviewer_bot/test_state_store.py index cc91c3c7c..805345800 100644 --- a/tests/unit/reviewer_bot/test_state_store.py +++ b/tests/unit/reviewer_bot/test_state_store.py @@ -159,7 +159,7 @@ def fake_request(method, endpoint, data=None, extra_headers=None, **kwargs): snapshot = state_store.get_state_issue_snapshot(bot) assert snapshot is not None - assert snapshot.html_url == "https://github.com/rustfoundation/safety-critical-rust-coding-guidelines/issues/1" + assert snapshot.html_url == "https://github.com/Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines/issues/1" def test_loaded_state_fails_closed_for_invalid_legacy_review_entry_shape(monkeypatch): diff --git a/tests/unit/reviewer_bot/test_sweeper_logic.py b/tests/unit/reviewer_bot/test_sweeper_logic.py index 65c8981f1..0804afef2 100644 --- a/tests/unit/reviewer_bot/test_sweeper_logic.py +++ b/tests/unit/reviewer_bot/test_sweeper_logic.py @@ -537,7 +537,7 @@ def test_h4a_review_submission_gap_fixture_stays_narrow_and_explicit(): def test_stage_a_candidate_run_correlation_is_exact_to_workflow_event_pr_and_window(monkeypatch): runtime = _runtime(monkeypatch) - runtime.set_config_value("GITHUB_REPOSITORY", "rustfoundation/safety-critical-rust-coding-guidelines") + runtime.set_config_value("GITHUB_REPOSITORY", "Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines") result = deferred_gap_diagnosis.correlate_candidate_observer_runs( "issue_comment:101", source_event_kind="issue_comment:created", @@ -548,7 +548,7 @@ def test_stage_a_candidate_run_correlation_is_exact_to_workflow_event_pr_and_win workflow_run(1, event="issue_comment", path=".github/workflows/reviewer-bot-pr-comment-router.yml", created_at="2026-03-17T10:05:00Z"), workflow_run(2, event="issue_comment", path=".github/workflows/reviewer-bot-pr-comment-router.yml", created_at="2026-03-17T10:40:00Z"), ], - github_repository="rustfoundation/safety-critical-rust-coding-guidelines", + github_repository="Safety-Critical-Rust-Consortium/safety-critical-rust-coding-guidelines", ) assert result["candidate_run_ids"] == [1] From f1fcd19e85524eb522d6d2fff0086c9442e2fb02 Mon Sep 17 00:00:00 2001 From: Marcos Borges <205091563+MarcosBorgesPhD@users.noreply.github.com> Date: Fri, 10 Jul 2026 18:20:15 +0200 Subject: [PATCH 2/2] test: update mock repo owner to Safety-Critical-Rust-Consortium --- tests/unit/reviewer_bot/test_state_store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/reviewer_bot/test_state_store.py b/tests/unit/reviewer_bot/test_state_store.py index 805345800..430ae503e 100644 --- a/tests/unit/reviewer_bot/test_state_store.py +++ b/tests/unit/reviewer_bot/test_state_store.py @@ -151,7 +151,7 @@ def fake_request(method, endpoint, data=None, extra_headers=None, **kwargs): transport_error=None, ) - config = {"REPO_OWNER": "rustfoundation", "REPO_NAME": "safety-critical-rust-coding-guidelines"} + config = {"REPO_OWNER": "Safety-Critical-Rust-Consortium", "REPO_NAME": "safety-critical-rust-coding-guidelines"} bot = _bot(monkeypatch, github_api_request=fake_request) bot.state_issue_number = lambda: 1 bot.get_config_value = lambda name, default="": config.get(name, default)