compaction

package
v0.1.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidCompactionContinuityParentPort = errors.New("featurehost/compaction: invalid compaction-continuity parent port")
View Source
var ErrInvalidCompactionContinuityResultAdapter = errors.New("featurehost/compaction: invalid compaction-continuity result adapter")

Functions

func SchedulerBoundsFromConfig

func SchedulerBoundsFromConfig(cfg *config.Config) auxreq.SchedulerConfig

SchedulerBoundsFromConfig translates compaction continuity feature config into generic auxiliary scheduler bounds.

Types

type CompactionContinuityResultAdapter

type CompactionContinuityResultAdapter struct {
	// contains filtered or unexported fields
}

CompactionContinuityResultAdapter binds one process-owned coordinator and authoritative parent key without decoding a branch binding into a BranchKey.

func NewCompactionContinuityResultAdapter

func NewCompactionContinuityResultAdapter(coordinator *state.BranchCoordinator, parentKey state.BranchKey) (*CompactionContinuityResultAdapter, error)

NewCompactionContinuityResultAdapter binds result consumption to the process-owned coordinator and authoritative parentKey.

func (*CompactionContinuityResultAdapter) CommitCapsuleForJob

func (a *CompactionContinuityResultAdapter) CommitCapsuleForJob(ctx context.Context, branchBinding string, jobID auxiliary.JobID, resultBranchBinding string, expectedRevision uint64, capsule []byte, digest [32]byte, sourceHighWatermark string) (resultmerge.ParentState, error)

CommitCapsuleForJob delegates the job-bound CAS to the real coordinator after validating both branch-binding arguments against the captured parent.

func (*CompactionContinuityResultAdapter) ValidatePendingJob

func (a *CompactionContinuityResultAdapter) ValidatePendingJob(ctx context.Context, branchBinding string, jobID auxiliary.JobID) (resultmerge.ParentState, error)

ValidatePendingJob validates the job and translates its defensive state copy.

type ParentPort

type ParentPort struct {
	// contains filtered or unexported fields
}

ParentPort is the featurehost-owned adapter for the process coordinator. The coordinator remains the only state/CAS authority; this adapter retains a bounded-in-purpose binding-to-key map because the feature deliberately exposes only opaque branch bindings after Capture.

Parent identity is taken from trusted execution context and detector metadata. The canonical Call is intentionally not consulted for identity: detached calls carry a private child A-leg and must never replace the authoritative parent A-leg.

func NewParentPort

func NewParentPort(coordinator *state.BranchCoordinator) (*ParentPort, error)

NewParentPort constructs an authoritative ParentPort adapter backed by the coordinator.

func (*ParentPort) BindPreviewIntent

func (p *ParentPort) BindPreviewIntent(ctx context.Context, parent featurecontinuity.ParentBranch, intentKey, transactionID string) (featurecontinuity.ParentState, error)

func (*ParentPort) Capture

Capture derives and records the authoritative parent before any detached child is created. For an already-detached context, the trusted parent marker wins over PreservationMeta's child A-leg.

func (*ParentPort) CaptureMeta

CaptureMeta is the response-boundary capture path. It deliberately shares the same trusted identity derivation as Capture and therefore cannot bind a result to the private child A-leg present in response metadata.

func (*ParentPort) CommitCapsule

func (p *ParentPort) CommitCapsule(ctx context.Context, parent featurecontinuity.ParentBranch, revision uint64, capsule []byte, digest [32]byte, watermark string) (featurecontinuity.ParentState, error)

func (*ParentPort) CommitCapsuleForJob

func (p *ParentPort) CommitCapsuleForJob(ctx context.Context, parent featurecontinuity.ParentBranch, jobID auxiliary.JobID, resultBinding string, revision uint64, capsule []byte, digest [32]byte, watermark string) (featurecontinuity.ParentState, error)

func (*ParentPort) CommitSource

func (p *ParentPort) CommitSource(ctx context.Context, parent featurecontinuity.ParentBranch, revision uint64, src []byte, watermark string) (featurecontinuity.ParentState, error)

func (*ParentPort) RecordPendingJob

func (p *ParentPort) RecordPendingJob(ctx context.Context, parent featurecontinuity.ParentBranch, jobID auxiliary.JobID, revision uint64) (featurecontinuity.ParentState, error)

func (*ParentPort) Snapshot

func (*ParentPort) ValidatePendingJob

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL