perago.build_workspace_publication_plan#
- perago.build_workspace_publication_plan(*, task, workspace, workspace_spec, current_head, commits, staging_commit)[源代码]#
Assemble the full publication plan for a workspace task attempt.
- Parameters:
- taskobject
Attempt-like object exposing workflow identity, task identity, and retry fields used for metadata and staging-branch naming.
- workspaceWorkspaceInput | dict[str, Any]
Workspace input reference for the attempt.
- workspace_specWorkspaceSpec
Workspace contract whose normalized prefix is recorded in metadata.
- current_headstr
Current target branch head observed immediately before publish.
- commitsSequence[object]
Commit range between the original workspace ref and
current_head.- staging_commitstr
Commit id produced after staging the local workspace content.
- Returns:
- WorkspacePublicationPlan
Immutable plan containing publish-fence decisions and both metadata maps.
- Raises:
- PublishFenceError
Raised when the current branch advancement cannot be attributed to the same logical task.
- AttributeError
Raised when
taskis missing required attempt attributes.- pydantic.ValidationError
Raised when
workspacecannot be validated asperago.WorkspaceInput.- TypeError
Raised when metadata values cannot be serialized.
- 参数:
task (object)
workspace (WorkspaceInput | dict[str, Any])
workspace_spec (WorkspaceSpec)
current_head (str)
staging_commit (str)
- 返回类型: