story 2-12-preview-partial-mode: implemented and reviewed via bmad-loop

This commit is contained in:
bsodfather committed 2026-10-03 15:04:15 +03:00
1 parent d1ba0bd0e4
commit ab35d67177
56 files changed
+5801 -376

No files matched your search

+27 -1
View File
@@ -10,7 +10,7 @@ use serde_json::Value;
/// deliberately travel with an import job: changing either contract must not
/// silently reinterpret a pending preview.
pub const NORMALIZER_VERSION: &str = "normalized-ir-v5";
pub const PROJECTION_VERSION: &str = "preview-v5";
pub const PROJECTION_VERSION: &str = "preview-v6";
pub const HISTORICAL_NORMALIZER_VERSION: &str = "normalized-ir-v4";
pub const HISTORICAL_PROJECTION_VERSION: &str = "preview-v4";
@@ -496,6 +496,10 @@ pub struct ImportFinding {
pub message: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub operation_key: Option<String>,
/// RFC 6901 source pointer of the finding. Optional so preview payloads
/// persisted before this field was introduced still deserialize.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub source_location: Option<SourceLocation>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
@@ -514,6 +518,17 @@ pub struct ImportPreview {
pub groups: Vec<ImportGroupPreview>,
#[serde(default)]
pub findings: Vec<ImportFinding>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub conflicts: Vec<ImportNameConflict>,
}
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct ImportNameConflict {
pub operation_key: String,
pub conflict_type: String,
pub proposed_name: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub source_location: Option<SourceLocation>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
@@ -528,6 +543,13 @@ pub struct ImportOperationCandidate {
pub key: String,
pub method: HttpMethod,
pub path: String,
/// Workspace-aware readiness is attached by the API after immutable replay.
#[serde(default, skip_serializing_if = "String::is_empty")]
pub status: String,
/// RFC 6901 pointer of the source operation. Optional so preview payloads
/// persisted before this field was introduced still deserialize.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub source_location: Option<SourceLocation>,
#[serde(
default,
skip_serializing_if = "NormalizedSecurityRequirements::is_empty"
@@ -583,6 +605,10 @@ pub struct RestImportOperation {
pub key: String,
pub method: HttpMethod,
pub path: String,
/// Authoritative RFC 6901 pointer of the operation when it was produced by
/// the normalizer. Parser state only; never persisted.
#[serde(skip)]
pub source_location: Option<SourceLocation>,
#[serde(
default,
skip_serializing_if = "NormalizedSecurityRequirements::is_empty"