Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d20b899
Make required-v2-native's envelope, flags, budget, and main occupancy…
Sep 10, 2026
fe8e5be
Scope P0a to native-job supersession and a 360-minute envelope.
Sep 10, 2026
1091c67
Make PR-head native supersession reachable: unique workflow run_id.
Sep 10, 2026
b875898
Supersede stale witnesses.yml runs at whole-workflow PR and main grain.
Sep 10, 2026
6bc0a18
Merge origin/main so P0a.1 is not based behind the publication-witnes…
Sep 10, 2026
662b29a
Join witnesses.yml cancel to occupancy standing, not a second policy …
Sep 10, 2026
c434c88
Split occupancy grouping from fleet-safe running cancel.
Sep 11, 2026
da99984
Delete the witness-only cancel join; four-cell the production chain.
Sep 11, 2026
1171ef2
Retire the 2026-08-17 unique-run_id grouping annotation.
Sep 11, 2026
8b3dee1
Derive the concurrency group from the event-name and heal-input autho…
Sep 11, 2026
b49128b
Fold concurrency-group GHA from modeled event/subject rows and resolv…
Sep 11, 2026
6b088db
Require joined event-and-subject group patterns and a crossed-pairing…
Sep 11, 2026
11345f9
Declare the main per-commit floor drop and bind the heal resolver to …
Sep 11, 2026
ba68bd5
Correct the main-floor drop trigger and unbind timeout from the group…
Sep 11, 2026
9a9adc2
Delete the required-v2-native CI job; the route stays as an operator-…
Sep 11, 2026
55fa347
Merge occupancy grouping onto the native-job deletion.
Sep 11, 2026
5ea0164
Emit occupancy grouping and cancel expressions through extdeps.github…
Sep 11, 2026
ef52ded
Merge origin/main into prep/lark.
Sep 11, 2026
52909e7
Model NotEquals in GitHub expressions and drop the heal gap row.
Sep 11, 2026
bb591f3
Delete the producer-side event-name string serializer.
Sep 11, 2026
b80c7c5
Move GHA evaluation into extdeps.github.expressions and refuse unmode…
Sep 11, 2026
e481e1d
Merge origin/main into session/sharp-tern-402.
Sep 11, 2026
d752595
Derive mutable-head event membership and cancel OR from one roster.
Sep 11, 2026
99d0f59
Treat only the empty string as falsy in the GHA expression evaluator.
Sep 11, 2026
7ef183d
Keep running-cancel restoration to pull_request; do not cancel runnin…
Sep 11, 2026
cab3525
Merge origin/main into session/sharp-tern-402.
Sep 11, 2026
b13a3b9
Wire the safe fleet arm to SupersedeMutableHeadRuns over the PR-only …
Sep 11, 2026
7133546
Delete the unused SupersedeMutableHeadRuns surface.
Sep 11, 2026
8f9c28f
Name grouping and the main-verdict drop instead of citing the group a…
Sep 11, 2026
db677c9
Split grouping and PR-activity witnesses off the full YAML serialize.
Sep 11, 2026
f052982
Restore trigger-types emission coverage without a full workflow seria…
Sep 11, 2026
608c9ad
Record that trigger-types coverage is the on: fragment plus the YAML …
Sep 11, 2026
4f25511
Route cancel-in-progress through github_event_name_equals and drop th…
Sep 11, 2026
3529136
Merge origin/main after #10981 landed.
Sep 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 11 additions & 27 deletions dag/gunbc/witness/witness_floor_workflow.dag
Original file line number Diff line number Diff line change
Expand Up @@ -269,45 +269,33 @@ fn github_run_id_expr() -> Expression { ContextAccess { context: Github, path: [
fn github_pr_number_expr() -> Expression { ContextAccess { context: Github, path: ["event", "pull_request", "number"] } }
fn github_dispatch_input_expr(name: String) -> Expression { ContextAccess { context: Github, path: ["event", "inputs", name] } }

fn gha_and(left: Expression, right: Expression) -> Expression {
LogicalAnd { left: left, right: right }
}

fn gha_or(left: Expression, right: Expression) -> Expression {
LogicalOr { left: left, right: right }
}

type WitnessFloorGroupBranch
= ShaAfterEvent { event: String, prefix: String }
| NonemptyInputAfterEvent { event: String, input: String, prefix: String }
| PrNumberAfterEvent { event: String, prefix: String }
| RefAfterEvent { event: String }
| RunIdFallback { prefix: String }

fn gha_not_equals(left: Expression, right: Expression) -> Expression {
NotEquals { left: left, right: right }
}

fn nonempty_input_after_event_expr(event: String, input: String, prefix: String) -> Expression {
gha_and(
LogicalAnd {
left: github_event_name_equals(event: event),
right: gha_and(
left: gha_not_equals(left: github_dispatch_input_expr(name: input), right: StringLiteral { value: "" }),
right: LogicalAnd {
left: NotEquals { left: github_dispatch_input_expr(name: input), right: StringLiteral { value: "" } },
right: gha_format_prefix(prefix: prefix, arg: github_dispatch_input_expr(name: input))
)
)
}
}
}

fn group_branch_expr(branch: WitnessFloorGroupBranch) -> Expression {
match branch {
ShaAfterEvent { event: e, prefix: p } =>
gha_and(left: github_event_name_equals(event: e), right: gha_format_prefix(prefix: p, arg: github_sha_expr()))
LogicalAnd { left: github_event_name_equals(event: e), right: gha_format_prefix(prefix: p, arg: github_sha_expr()) }
NonemptyInputAfterEvent { event: e, input: i, prefix: p } =>
nonempty_input_after_event_expr(event: e, input: i, prefix: p)
PrNumberAfterEvent { event: e, prefix: p } =>
gha_and(left: github_event_name_equals(event: e), right: gha_format_prefix(prefix: p, arg: github_pr_number_expr()))
LogicalAnd { left: github_event_name_equals(event: e), right: gha_format_prefix(prefix: p, arg: github_pr_number_expr()) }
RefAfterEvent { event: e } =>
gha_and(left: github_event_name_equals(event: e), right: github_ref_expr())
LogicalAnd { left: github_event_name_equals(event: e), right: github_ref_expr() }
RunIdFallback { prefix: p } =>
gha_format_prefix(prefix: p, arg: github_run_id_expr())
}
Expand All @@ -320,7 +308,7 @@ fn witness_floor_group_expression() -> Expression {
fold_list(
xs: skip(xs: witness_floor_group_branches(), n: 1),
empty: group_branch_expr(branch: first),
cons: fn(acc, b) { gha_or(left: acc, right: group_branch_expr(branch: b)) }
cons: fn(acc, b) { LogicalOr { left: acc, right: group_branch_expr(branch: b) } }
)
}
}
Expand Down Expand Up @@ -527,15 +515,11 @@ data witness_floor_running_supersession_policy: RunningSupersessionPolicy = witn

data witness_floor_pending_replacement_policy: PendingReplacementPolicy = witness_floor_concurrency_policy.pending

fn supersession_event_expression(event: String) -> String {
concat(concat("${{ github.event_name == '", event), "' }}")
}

fn cancel_in_progress_of_policy(policy: RunningSupersessionPolicy) -> CancelInProgressSpec {
match policy {
NeverSupersedeRunning => CancelInProgressBool { value: false }
SupersedeRunningForEvent { event: e } =>
CancelInProgressExpression { expression: supersession_event_expression(event: e) }
CancelInProgressExpression { expression: interpolate(expression: github_event_name_equals(event: e)) }
}
}

Expand All @@ -555,7 +539,7 @@ fn queue_max_cancel_of_policy(policy: RunningSupersessionPolicy) -> CancelInProg
match policy {
NeverSupersedeRunning => QueueMaxCancelInProgressFalse
SupersedeRunningForEvent { event: e } =>
QueueMaxCancelInProgressExpression { expression: supersession_event_expression(event: e) }
QueueMaxCancelInProgressExpression { expression: interpolate(expression: github_event_name_equals(event: e)) }
}
}

Expand Down
5 changes: 3 additions & 2 deletions dag/test/claim/run_disposition_witness_test.dag
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ import gunbc.witness_floor_workflow {
RunningSupersessionPolicy,
NeverSupersedeRunning,
SupersedeRunningForEvent,
supersession_event_expression,
github_event_name_equals,
witness_floor_concurrency_policy,
witness_floor_running_supersession_policy,
concurrency_of_policy
}
import extdeps.github.expressions { interpolate }
import extdeps.github.actions {
ConcurrencySpec,
ConcurrencyScalar,
Expand Down Expand Up @@ -640,7 +641,7 @@ test fn w_running_cancel_four_cell_through_the_producer() -> Bool {
CancelInProgressExpression { expression: _ } => false
}
let safe_cancel = match cancel_in_progress_of_policy(policy: safe) {
CancelInProgressExpression { expression: e } => e == supersession_event_expression(event: "pull_request")
CancelInProgressExpression { expression: e } => e == interpolate(expression: github_event_name_equals(event: "pull_request"))
CancelInProgressBool { value: _ } => false
}
unproven_is_never
Expand Down
Loading