Class DesignPreflightReport
- All Implemented Interfaces:
Serializable
POST /datasets/{id}/designPreflight. Predicts what would happen if the
accompanying proposed ExperimentalDesignValueObject were PUT to /datasets/{id}/design.
Contract:
blockersnon-empty ⇒ the corresponding PUT would return 4xx. Caller must fix the payload.blockersempty ANDrequiresForce()false ⇒ PUT would succeed without?force=true.blockersempty ANDrequiresForce()true ⇒ PUT needs?force=true(admin) to consent to the consequences.
- Author:
- ogan
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classOne reason the proposed payload cannot be applied.static classstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionHard validation errors.Kept factors whose name, description or category the proposal rewrites.Kept factor values the proposal edits in place: a statement re-termed, evidence attached, the baseline flag flipped, a measurement retimed, the deprecated free-text value rewritten.Subsets whose definitional factor-value anchors would be deleted.booleanWhether applying this change needs explicit consent (?force=true, admin) rather than proceeding silently.voidsetBlockers(List<DesignPreflightReport.Blocker> blockers) Hard validation errors.voidsetDifferentialExpressionAnalysesToDelete(List<DesignPreflightReport.AnalysisRef> differentialExpressionAnalysesToDelete) voidsetFactorsToDelete(List<DesignPreflightReport.EntityRef> factorsToDelete) voidsetFactorsToUpdate(List<DesignPreflightReport.EntityRef> factorsToUpdate) Kept factors whose name, description or category the proposal rewrites.voidsetFactorValuesToDelete(List<DesignPreflightReport.EntityRef> factorValuesToDelete) voidsetFactorValuesToUpdate(List<DesignPreflightReport.EntityRef> factorValuesToUpdate) Kept factor values the proposal edits in place: a statement re-termed, evidence attached, the baseline flag flipped, a measurement retimed, the deprecated free-text value rewritten.voidsetSubsetsWithStaleAnchor(List<DesignPreflightReport.SubsetRef> subsetsWithStaleAnchor) Subsets whose definitional factor-value anchors would be deleted.voidsetSummary(DesignPreflightReport.Summary summary)
-
Constructor Details
-
DesignPreflightReport
public DesignPreflightReport()
-
-
Method Details
-
requiresForce
public boolean requiresForce()Whether applying this change needs explicit consent (?force=true, admin) rather than proceeding silently. True when the change would delete differential-expression analyses, or would leave a subset defined by factor values that no longer exist.Subsets are included deliberately. A cascade-deleted analysis is gone, and gone announces itself — somebody re-runs it. An orphaned subset is still there, still named, still listed, and now anchored on factor values that were deleted out from under it: it reads as valid. A false prompt costs a curator one
force=true; a false silence costs a subset that nobody notices is wrong until it produces a wrong answer.Consent is per-request, not per-consequence: a caller that forces past an analysis cascade also forces past a stale anchor. Callers should therefore surface
differentialExpressionAnalysesToDeleteandsubsetsWithStaleAnchorseparately so the curator sees which they are agreeing to. -
getBlockers
Hard validation errors. A non-empty list means the PUT would be rejected; fix the payload and re-run. -
getSummary
-
getFactorsToDelete
-
getFactorValuesToDelete
-
getFactorsToUpdate
Kept factors whose name, description or category the proposal rewrites.Nothing is created or deleted by such an edit, so every counter above it stays at zero and the report used to describe a real change as
unchanged. The apply path has always performed these — seeisNoOpDesignApply, which consults the same comparison — so the gap was in what the report could say, not in what a PUT would do. -
getFactorValuesToUpdate
Kept factor values the proposal edits in place: a statement re-termed, evidence attached, the baseline flag flipped, a measurement retimed, the deprecated free-text value rewritten.cab hit the gap on GSE49354.1 (2026-08-27): re-terming one factor value's subject URI preflighted as
{created: 0, updated: 0, deleted: 0, unchanged: 1}, which reads as "nothing to do" for an edit that a PUT would in fact apply. -
getDifferentialExpressionAnalysesToDelete
-
getSubsetsWithStaleAnchor
Subsets whose definitional factor-value anchors would be deleted. These are not blockers (subsets carry no FK to FactorValue), but their semantics drift after the change, so they require the same explicit consent as the analysis cascade — seerequiresForce(). -
setBlockers
Hard validation errors. A non-empty list means the PUT would be rejected; fix the payload and re-run. -
setSummary
-
setFactorsToDelete
-
setFactorValuesToDelete
-
setFactorsToUpdate
Kept factors whose name, description or category the proposal rewrites.Nothing is created or deleted by such an edit, so every counter above it stays at zero and the report used to describe a real change as
unchanged. The apply path has always performed these — seeisNoOpDesignApply, which consults the same comparison — so the gap was in what the report could say, not in what a PUT would do. -
setFactorValuesToUpdate
Kept factor values the proposal edits in place: a statement re-termed, evidence attached, the baseline flag flipped, a measurement retimed, the deprecated free-text value rewritten.cab hit the gap on GSE49354.1 (2026-08-27): re-terming one factor value's subject URI preflighted as
{created: 0, updated: 0, deleted: 0, unchanged: 1}, which reads as "nothing to do" for an edit that a PUT would in fact apply. -
setDifferentialExpressionAnalysesToDelete
public void setDifferentialExpressionAnalysesToDelete(List<DesignPreflightReport.AnalysisRef> differentialExpressionAnalysesToDelete) -
setSubsetsWithStaleAnchor
Subsets whose definitional factor-value anchors would be deleted. These are not blockers (subsets carry no FK to FactorValue), but their semantics drift after the change, so they require the same explicit consent as the analysis cascade — seerequiresForce().
-