@@ -229,7 +229,10 @@ pub struct MigrationSemantic {
229229 pub snapshot_label : Option < String > ,
230230}
231231
232- /// Build a VerisimDB hexad from an assault report
232+ /// Build a VerisimDB hexad from an assault report.
233+ ///
234+ /// # Errors
235+ /// Propagates errors from serialising the report into its JSON document.
233236fn build_hexad ( report : & AssaultReport ) -> Result < PanicAttackHexad > {
234237 let now = Utc :: now ( ) ;
235238 let id = format ! (
@@ -375,6 +378,9 @@ pub fn persist_report(
375378///
376379/// Unlike single-repo hexads which wrap an AssaultReport, assemblyline
377380/// hexads capture the batch scan results across many repos.
381+ ///
382+ /// # Errors
383+ /// Propagates errors from serialising the report into its JSON document.
378384fn build_assemblyline_hexad (
379385 report : & crate :: assemblyline:: AssemblylineReport ,
380386) -> Result < PanicAttackHexad > {
@@ -492,13 +498,13 @@ fn severity_label(severity: &crate::types::Severity) -> &'static str {
492498 }
493499}
494500
495- /// Build one hexad per `WeakPoint` across all repo results in an
496- /// assemblyline report (issue #33 S1).
501+ /// Build one hexad per unsuppressed `WeakPoint` across repo results with an
502+ /// AssailReport in an assemblyline report (issue #33 S1).
497503///
498504/// Subject identity lives in `semantic.finding.finding_id`; each emitted
499- /// hexad's top-level `id` remains per-run-unique so two runs of the same
500- /// finding produce two distinct hexad files (the join key is the
501- /// `finding_id`, not the hexad id) .
505+ /// hexad's top-level `id` includes a millisecond timestamp and repo/finding
506+ /// indices. IDs are distinct within a call but may repeat across calls in
507+ /// the same millisecond; use `finding_id` as the join key .
502508///
503509/// `run_id` is shared across every finding-hexad in this run and stamped
504510/// into both `first_seen_run` and `last_seen_run` (S1 has no prior-run
@@ -662,10 +668,10 @@ fn derive_crosslang_interactions_for_report(
662668/// repo in an assemblyline report (issue #33 kanren-crosslang follow-up).
663669///
664670/// Subject identity lives in `semantic.crosslang.interaction_id`; the
665- /// top-level hexad `id` is per-run-unique so two runs of the same
666- /// interaction produce two distinct hexad files (the join key is the
667- /// `interaction_id`, not the hexad id) . Returns an empty `Vec` when the
668- /// report has no AssailReport-bearing results or no derivable interactions.
671+ /// top-level hexad `id` includes a millisecond timestamp and repo/interaction
672+ /// indices. IDs are distinct within a call but may repeat across calls in
673+ /// the same millisecond; use `interaction_id` as the join key . Returns an empty
674+ /// `Vec` when the report has no AssailReport-bearing results or no derivable interactions.
669675pub fn build_crosslang_hexads (
670676 report : & crate :: assemblyline:: AssemblylineReport ,
671677) -> Result < Vec < PanicAttackHexad > > {
@@ -772,9 +778,10 @@ const HEXAD_FILE_READ_LIMIT: u64 = 16 * 1024 * 1024;
772778
773779/// Build a campaign-state hexad for one lifecycle event (issue #33 S2).
774780///
775- /// Append-only: each call produces a fresh hexad with a unique id. The
776- /// `finding_id` is carried as the semantic subject so the newest hexad
777- /// per finding is the current state.
781+ /// The id is derived from the current millisecond timestamp, so calls in the
782+ /// same millisecond can produce the same id. This only constructs a hexad;
783+ /// it does not write to storage. The `finding_id` is carried as the semantic
784+ /// subject so stored events can be grouped by finding.
778785pub fn build_campaign_hexad ( semantic : CampaignSemantic ) -> PanicAttackHexad {
779786 let now = Utc :: now ( ) ;
780787 let hexad_id = format ! (
0 commit comments