livery.workshop._scope¶
livery.workshop._scope ¶
Local check-leg scope marker and proved-branch lookup for coverage union.
Each check leg leaves its scope in fm-gate.json beside its trace
(full, affected, nothing, or verified) so the leg's
entries after the gate, and its timing row, know which suites ran.
verified_branch reads the pull request branch whose proved rows cover
the checked-out tree on main, so the coverage extension can carry
over that branch's parts before Phase B6 moves coverage beside the
proved row itself.
Classes:
| Name | Description |
|---|---|
LegScope |
What the gate ran on one check leg, as the marker the leg left says. |
VerifiedBranch |
The branch whose proved rows cover a tree, or why the record could not say. |
Functions:
| Name | Description |
|---|---|
write_marker |
Leave the leg's scope, suites, label, and proving branch beside its trace. |
leg_scope |
Read what the gate ran on this leg from the marker it left at root. |
verified_branch |
Read which pull request branch's proved rows cover the checkout at root. |
Attributes:
| Name | Type | Description |
|---|---|---|
MARKER |
|
|
FULL |
|
|
AFFECTED |
|
|
NOTHING |
|
|
VERIFIED |
|
|
KNOWN |
|
LegScope
dataclass
¶
LegScope(scope: str, packages: tuple[str, ...] = (), leg: str = '', base_tree: str = '', branch: str = '')
What the gate ran on one check leg, as the marker the leg left says.
Attributes:
| Name | Type | Description |
|---|---|---|
scope |
str
|
What the gate ran: |
packages |
tuple[str, ...]
|
The paths of the suites a narrowed gate ran; empty for every other scope. |
leg |
str
|
The label the leg's rows are keyed by
( |
base_tree |
str
|
The tree a narrowed gate measured from; empty when absent. |
branch |
str
|
The pull request branch whose proved rows satisfied a
|
VerifiedBranch
dataclass
¶
The branch whose proved rows cover a tree, or why the record could not say.
Attributes:
| Name | Type | Description |
|---|---|---|
branch |
str
|
The pull request branch whose run proved the tree; empty when no branch proved it or the record could not be read. |
reason |
str
|
Why the record decided nothing; empty when the record was read. |
write_marker ¶
write_marker(root: Path, scope: str, packages: tuple[str, ...] = (), *, leg: str = '', base_tree: str = '', branch: str = '') -> None
Leave the leg's scope, suites, label, and proving branch beside its trace.
Source code in packages/workshop/src/livery/workshop/_scope.py
leg_scope ¶
Read what the gate ran on this leg from the marker it left at root.
Source code in packages/workshop/src/livery/workshop/_scope.py
verified_branch ¶
verified_branch(root: Path) -> VerifiedBranch
Read which pull request branch's proved rows cover the checkout at root.