Evidence
@@ -0,0 +1,811 @@
+#![allow(dead_code)]
+
+use anyhow::Context;
+use chrono::Utc;
+use rusqlite::{params, Connection, OptionalExtension, TransactionBehavior};
+
+use crate::storage::Store;
+
+#[derive(Debug, Clone)]
+pub struct PrUpsertInput {
+ pub repo: String,
+ pub pr_number: i64,
+ ...
@@ +23,12 +23,12 @@
+#[derive(Debug, Clone, Default)]
+pub struct UpsertOutcome {
+ pub inserted: bool,
+ pub head_changed: bool,
+ pub queued: bool,
+}
@@ +30,10 +30,10 @@
+pub struct GenerationJob {
+ pub artifact_id: i64,
+ pub pr_id: i64,
+ pub repo: String,
@@ +45,10 +45,10 @@
+pub struct FeedItem {
+ pub pr_id: i64,
+ pub repo: String,
@@ +57,17 +57,17 @@
+pub struct PrDetailRecord {
+ pub repo: String,
+ ...
@@ +76,9 +76,9 @@
+pub struct PrSummaryRecord {
+ pub repo: String,
The new file begins with #![allow(dead_code)] at the module level since several structs and methods are not yet called from production code paths. It imports crate::storage::Store so it can add impl Store blocks—Rust allows trait-free impl blocks on a type from another module within the same crate.
All six data structs are moved without modification:
| Struct | Purpose |
PrUpsertInput | Input payload for upserting a PR row |
UpsertOutcome | Return value describing what changed during upsert |
GenerationJob | Row returned when claiming pending generation work |
FeedItem | Lightweight PR record for the activity feed |
PrDetailRecord | Full PR detail including tutorial JSON and diff |
PrSummaryRecord | Summary record with optional tutorial payload |