embassy_github/provenance.rs
1// Copyright 2024-2026 Reflective Labs
2// SPDX-License-Identifier: MIT
3
4use converge_pack::ProvenanceSource;
5
6/// Canonical provenance marker for facts emitted by the GitHub port port.
7#[derive(Copy, Clone, Debug)]
8pub struct Github;
9
10impl ProvenanceSource for Github {
11 fn as_str(&self) -> &'static str {
12 "github"
13 }
14}
15
16pub const GITHUB_PROVENANCE: Github = Github;
17
18#[cfg(test)]
19mod tests {
20 use super::*;
21
22 #[test]
23 fn provenance_string_is_canonical() {
24 // Intent: every fact emitted by this port carries the
25 // canonical provenance string. If a future refactor changes
26 // this constant, every log-search that scopes
27 // `provenance="github"` silently misses new facts.
28 assert_eq!(GITHUB_PROVENANCE.as_str(), "github");
29 }
30}