Add typed repo work Modeling requests

This commit is contained in:
Meta Vens 2026-07-12 10:35:33 +01:00
commit 2de8df0432
9 changed files with 203 additions and 5 deletions

View file

@ -3,6 +3,9 @@ use cultcache_rs::DatabaseEntry;
pub const REPO_WORK_MODELING_FINDING_TYPE: &str = "epiphany.modeling.repo_work_finding";
pub const REPO_WORK_MODELING_FINDING_SCHEMA_VERSION: &str =
"epiphany.modeling.repo_work_finding.v0";
pub const REPO_WORK_MODELING_REQUEST_TYPE: &str = "epiphany.modeling.repo_work_request";
pub const REPO_WORK_MODELING_REQUEST_SCHEMA_VERSION: &str =
"epiphany.modeling.repo_work_request.v0";
pub const REPO_WORK_MAP_ENTRY_TYPE: &str = "epiphany.repo_work.map_entry";
pub const REPO_WORK_MAP_ENTRY_SCHEMA_VERSION: &str = "epiphany.repo_work.map_entry.v0";
@ -38,6 +41,38 @@ pub struct RepoWorkModelingFinding {
pub private_state_exposed: bool,
#[cultcache(key = 12)]
pub contract: String,
#[cultcache(key = 13)]
pub request_id: String,
}
#[derive(Debug, Clone, PartialEq, Eq, DatabaseEntry)]
#[cultcache(
type = "epiphany.modeling.repo_work_request",
schema = "RepoWorkModelingRequest"
)]
pub struct RepoWorkModelingRequest {
#[cultcache(key = 0)]
pub schema_version: String,
#[cultcache(key = 1)]
pub request_id: String,
#[cultcache(key = 2)]
pub item: String,
#[cultcache(key = 3)]
pub requester: String,
#[cultcache(key = 4)]
pub soul_verdict_receipt_id: String,
#[cultcache(key = 5)]
pub commit_sha: String,
#[cultcache(key = 6)]
pub changed_paths: Vec<String>,
#[cultcache(key = 7)]
pub instruction: String,
#[cultcache(key = 8)]
pub requested_at: String,
#[cultcache(key = 9)]
pub private_state_exposed: bool,
#[cultcache(key = 10)]
pub contract: String,
}
#[derive(Debug, Clone, PartialEq, Eq, DatabaseEntry)]