MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / sample_report

Function sample_report

atomic-cli/src/commands/triage/output.rs:860–962  ·  view source on GitHub ↗

A report fixture whose finding message carries HTML/JS metacharacters, so escaping can be asserted.

()

Source from the content-addressed store, hash-verified

858 /// A report fixture whose finding message carries HTML/JS metacharacters,
859 /// so escaping can be asserted.
860 fn sample_report() -> TriageReport {
861 let project = atomic_core::kg::project_id::ProjectId::from_base32(&"A".repeat(52)).unwrap();
862 TriageReport {
863 reference: "urn:atomic:triage:abc123".to_string(),
864 verdict: Verdict::Blocked,
865 inputs: Inputs {
866 feature: "feature".to_string(),
867 target: "dev".to_string(),
868 view_merkle: "ZPP4ZK3Z5OKZ".to_string(),
869 candidate_changes: vec!["HASH1".to_string()],
870 closure_additions: vec![],
871 intent_substance_hashes: BTreeMap::new(),
872 },
873 summary: Summary {
874 changes: 1,
875 files: 1,
876 criteria_met: 0,
877 criteria_unmet: 1,
878 findings_block: 1,
879 findings_warn: 0,
880 findings_info: 0,
881 },
882 intents: vec![IntentReport {
883 id: "intent:DEMO-A".to_string(),
884 why: Some("Because <it> matters & more".to_string()),
885 conforms: false,
886 gate_violations: vec!["missing why".to_string()],
887 criteria: vec![CriterionReport {
888 id: "urn:atomic:ac:DEMO-A-1".to_string(),
889 text: "a & b < c".to_string(),
890 status: "unmet".to_string(),
891 verified_by: None,
892 judgment_required: true,
893 satisfied_by: vec!["HASH1".to_string()],
894 }],
895 reviewed_by: Some("did:atomic:<reviewer>&co".to_string()),
896 }],
897 changes: vec![ChangeReport {
898 id: "HASH1".to_string(),
899 message: "fix <billing> & taxes".to_string(),
900 modifies: vec![atomic_core::kg::iri::mint_file(&project, "src/<a>.rs")],
901 coverage: "uncovered".to_string(),
902 files: vec![FileChange {
903 symbol: "~".to_string(),
904 path: "src/<a>.rs".to_string(),
905 summary: "3 hunks & counting".to_string(),
906 }],
907 diff: vec![DiffFileView {
908 path: "src/<a>.rs".to_string(),
909 status: "modified".to_string(),
910 hunks: vec![DiffHunkView {
911 header: "@@ -1,2 +1,2 @@".to_string(),
912 lines: vec![
913 DiffLineView {
914 tag: "-".to_string(),
915 content: "let x = <old> & 1;".to_string(),
916 },
917 DiffLineView {

Calls 1

unwrapMethod · 0.45