| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Osv.Publication
Contents
Description
Whether Pilot may replace the stored advisory artifact with a new compile.
Pilot writes only over the object revision it observed. It orders OSV and EPSS separately, each
by source identity, Last-Modified, and complete-stream digest, so an older run cannot replace
newer data. A new artifact may shrink only a bounded share below the durable size baseline, so a
damaged feed cannot replace good coverage. An operator's direct write bypasses these checks and
is the rollback authority. Ecluse.Core.Osv.Publication.Envelope carries the stored state.
Synopsis
- module Ecluse.Core.Osv.Publication.Types
- data PublicationRequest = PublicationRequest {}
- data Precondition
- data PublicationPlan = PublicationPlan {}
- data SourceOrder
- renderSourceOrder :: SourceOrder -> Text
- data OrderRefusal
- data ShrinkReading = ShrinkReading {}
- data PublicationRefusal
- planPublication :: ShrinkPolicy -> BaselineCapability -> PublicationRequest -> StoreObservation -> Either PublicationRefusal PublicationPlan
- renderPublicationRefusal :: PublicationRefusal -> Text
The vocabulary
The decision
data PublicationRequest Source #
One publication attempt: the compile's facts, the artifact's size, and its nonce.
Constructors
| PublicationRequest | |
Fields | |
Instances
| Show PublicationRequest Source # | |
Defined in Ecluse.Core.Osv.Publication Methods showsPrec :: Int -> PublicationRequest -> ShowS # show :: PublicationRequest -> String # showList :: [PublicationRequest] -> ShowS # | |
| Eq PublicationRequest Source # | |
Defined in Ecluse.Core.Osv.Publication Methods (==) :: PublicationRequest -> PublicationRequest -> Bool # (/=) :: PublicationRequest -> PublicationRequest -> Bool # | |
data Precondition Source #
The condition the store must hold for the write to land.
Constructors
| CreateOnly | Write only if no object holds the key. |
| ReplaceRevision ObjectRevision | Write only over this exact revision. |
Instances
| Show Precondition Source # | |
Defined in Ecluse.Core.Osv.Publication Methods showsPrec :: Int -> Precondition -> ShowS # show :: Precondition -> String # showList :: [Precondition] -> ShowS # | |
| Eq Precondition Source # | |
Defined in Ecluse.Core.Osv.Publication | |
data PublicationPlan Source #
An accepted publication: the write's precondition, the state it records, and how it was ordered.
Constructors
| PublicationPlan | |
Fields
| |
Instances
| Show PublicationPlan Source # | |
Defined in Ecluse.Core.Osv.Publication Methods showsPrec :: Int -> PublicationPlan -> ShowS # show :: PublicationPlan -> String # showList :: [PublicationPlan] -> ShowS # | |
| Eq PublicationPlan Source # | |
Defined in Ecluse.Core.Osv.Publication Methods (==) :: PublicationPlan -> PublicationPlan -> Bool # (/=) :: PublicationPlan -> PublicationPlan -> Bool # | |
data SourceOrder Source #
How one source's snapshot relates to the stored artifact's.
Constructors
| FreshScope | No marker from this source identity was stored, so the snapshot starts its ordering. |
| OrderedForward | The source declared a later |
| EqualSnapshot | The same |
| IdenticalBytes | The same bytes without comparable timestamps. The stored |
Instances
| Show SourceOrder Source # | |
Defined in Ecluse.Core.Osv.Publication Methods showsPrec :: Int -> SourceOrder -> ShowS # show :: SourceOrder -> String # showList :: [SourceOrder] -> ShowS # | |
| Eq SourceOrder Source # | |
Defined in Ecluse.Core.Osv.Publication | |
renderSourceOrder :: SourceOrder -> Text Source #
The order as the publication log reads it.
data OrderRefusal Source #
Why one source's snapshot cannot replace the stored one.
Constructors
| OlderSnapshot UTCTime UTCTime | The candidate's |
| AmbiguousSnapshot UTCTime | The same |
| UnorderedSnapshot | Different bytes with no timestamp pair to order them. |
Instances
| Show OrderRefusal Source # | |
Defined in Ecluse.Core.Osv.Publication Methods showsPrec :: Int -> OrderRefusal -> ShowS # show :: OrderRefusal -> String # showList :: [OrderRefusal] -> ShowS # | |
| Eq OrderRefusal Source # | |
Defined in Ecluse.Core.Osv.Publication | |
data ShrinkReading Source #
The size comparison a refused shrink failed, all in bytes.
Constructors
| ShrinkReading | |
Fields | |
Instances
| Show ShrinkReading Source # | |
Defined in Ecluse.Core.Osv.Publication Methods showsPrec :: Int -> ShrinkReading -> ShowS # show :: ShrinkReading -> String # showList :: [ShrinkReading] -> ShowS # | |
| Eq ShrinkReading Source # | |
Defined in Ecluse.Core.Osv.Publication Methods (==) :: ShrinkReading -> ShrinkReading -> Bool # (/=) :: ShrinkReading -> ShrinkReading -> Bool # | |
data PublicationRefusal Source #
Why Pilot will not replace the stored artifact. Consumers keep the stored one.
Constructors
| PredecessorUnreadable EnvelopeFault | The stored object's publication metadata is missing or unreadable. |
| PredecessorOutOfScope Text Int | The stored metadata names another ecosystem or schema epoch, both carried. |
| SourceOutOfOrder ProvenanceSource OrderRefusal | One source's snapshot is not ordered after the stored one. |
| ShrinkPastBaseline ShrinkReading | The artifact shrank past the baseline's allowance. |
| RebaselineMismatch ObjectRevision (Maybe ObjectRevision) | The rebaseline names a revision the store does not hold. |
Instances
| Show PublicationRefusal Source # | |
Defined in Ecluse.Core.Osv.Publication Methods showsPrec :: Int -> PublicationRefusal -> ShowS # show :: PublicationRefusal -> String # showList :: [PublicationRefusal] -> ShowS # | |
| Eq PublicationRefusal Source # | |
Defined in Ecluse.Core.Osv.Publication Methods (==) :: PublicationRefusal -> PublicationRefusal -> Bool # (/=) :: PublicationRefusal -> PublicationRefusal -> Bool # | |
planPublication :: ShrinkPolicy -> BaselineCapability -> PublicationRequest -> StoreObservation -> Either PublicationRefusal PublicationPlan Source #
Decide one attempt against one observation. A rebaseline replaces only the shrink allowance, never the ordering.
renderPublicationRefusal :: PublicationRefusal -> Text Source #
The refusal as an operator reads it, ending with what stays in place.