Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
14d6e1e
feat(work): plan board review policy decisions (#307 auto-approve)
Nov 17, 2026
82862ba
fix(work): apply workspace formatting to review policy tests
Nov 17, 2026
dad68e4
feat(work): feed opted-in review plans into board decisions
Nov 17, 2026
248e133
feat(work): verify own-diff and main merge review evidence from Git
Nov 17, 2026
177dc8c
fix(work): enforce review admission when promoting drafts
Nov 17, 2026
33353fb
feat(work): reserve review requests once per own-diff patch
Nov 17, 2026
156f798
feat(work): dispatch pinned review requests through authenticated run…
Nov 17, 2026
8416a9c
feat(work): derive review file evidence from pinned own diffs
Nov 17, 2026
0614627
feat(work): observe review policy through the opt-in GitHub shadow board
Nov 17, 2026
c3d0ab7
fix(work): parse board settings with the CLI JSON dependency
Nov 17, 2026
6002602
feat(work): accept commit-bound Codex review receipts on the shadow b…
Nov 17, 2026
943a5d5
Merge remote-tracking branch 'origin/main' into agent/307-board-revie…
Nov 17, 2026
7ce06df
Merge remote-tracking branch 'origin/main' into agent/307-board-revie…
Nov 17, 2026
361979c
Merge remote-tracking branch 'origin/main' into agent/307-board-revie…
Nov 17, 2026
b3ff339
Start review-policy follow-up from current main
Nov 17, 2026
58a18cb
test(board): reproduce lost approval after docs and tests changes
Nov 17, 2026
8e80f6f
test(board): restrict approval carry regression to owner evidence
Nov 17, 2026
9096397
fix(board): carry owner approval across verified docs and tests edits
Nov 17, 2026
f7ed24f
Start Reader acceptance fix from current main
Nov 18, 2026
a1eb623
test(board): cover an in-progress required check retaining success
Nov 18, 2026
402f6d1
fix(board): wait for required check completion before reading its con…
Nov 18, 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
20 changes: 13 additions & 7 deletions oxa/oxa-cli/src/work_board.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,15 @@ fn nodes(value: &Value) -> Result<&Vec<Value>, String> {
Ok(rows)
}

fn check_outcome(check: &Value) -> Option<&str> {
match check["status"].as_str() {
Some("COMPLETED") => check["conclusion"].as_str(),
// GitHub can retain a prior conclusion while the check is active.
Some(_) => None,
None => check["state"].as_str(),
}
}

fn required_contexts(base: &Value) -> Result<BTreeSet<&str>, String> {
if !base.is_object() {
return Err("missing PR base requirements".into());
Expand Down Expand Up @@ -419,7 +428,7 @@ impl Reader<'_> {
};
let required_ci = if checks.iter().any(|c| {
matches!(
c["state"].as_str().or(c["conclusion"].as_str()),
check_outcome(c),
Some(
"FAILURE"
| "ERROR"
Expand All @@ -438,12 +447,9 @@ impl Reader<'_> {
.iter()
.any(|c| c["name"].as_str().or(c["context"].as_str()) == Some(*name))
})
|| checks.iter().any(|c| {
!matches!(
c["state"].as_str().or(c["conclusion"].as_str()),
Some("SUCCESS" | "NEUTRAL" | "SKIPPED")
)
})
|| checks
.iter()
.any(|c| !matches!(check_outcome(c), Some("SUCCESS" | "NEUTRAL" | "SKIPPED")))
{
RequiredCi::Pending
} else {
Expand Down
32 changes: 17 additions & 15 deletions oxa/oxa-cli/tests/work_shadow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,22 +151,23 @@ fn real_cli_requires_opt_in_and_offline_never_reads_github() {
assert_eq!(sample["would_take"][0]["action"], "resolve_conflict");
assert_eq!(sample["board"]["entries"][0], sample["would_take"][0]);
let mut actual = vec![];
for (conclusion, head, source) in [
("STARTUP_FAILURE", "synthetic-head", ""),
("STALE", "synthetic-head", ""),
("SUCCESS", "old-head", ""),
("SUCCESS", "synthetic-head", ""),
("SUCCESS", "synthetic-head", "engine.c"),
("SUCCESS", "synthetic-head", "view.qml"),
("SUCCESS", "synthetic-head", "header.hpp"),
("SUCCESS", "synthetic-head", "kernel.inc"),
for (status, conclusion, head, source) in [
("COMPLETED", "STARTUP_FAILURE", "synthetic-head", ""),
("COMPLETED", "STALE", "synthetic-head", ""),
("IN_PROGRESS", "SUCCESS", "synthetic-head", ""),
("COMPLETED", "SUCCESS", "old-head", ""),
("COMPLETED", "SUCCESS", "synthetic-head", ""),
("COMPLETED", "SUCCESS", "synthetic-head", "engine.c"),
("COMPLETED", "SUCCESS", "synthetic-head", "view.qml"),
("COMPLETED", "SUCCESS", "synthetic-head", "header.hpp"),
("COMPLETED", "SUCCESS", "synthetic-head", "kernel.inc"),
] {
let row = &mut detail["data"]["repository"]["p42"];
row["mergeable"] = "MERGEABLE".into();
row["reviewDecision"] = "APPROVED".into();
row["latestOpinionatedReviews"] =
serde_json::json!({"totalCount":1,"nodes":[{"state":"APPROVED","commit":{"oid":head}}]});
row["commits"] = serde_json::json!({"nodes":[{"commit":{"statusCheckRollup":{"contexts":{"totalCount":1,"nodes":[{"name":"ci","isRequired":true,"conclusion":conclusion}]}}}}]});
row["commits"] = serde_json::json!({"nodes":[{"commit":{"statusCheckRollup":{"contexts":{"totalCount":1,"nodes":[{"name":"ci","isRequired":true,"status":status,"conclusion":conclusion}]}}}}]});
row["files"] = if source.is_empty() {
serde_json::json!({"totalCount":0,"nodes":[]})
} else {
Expand All @@ -193,6 +194,7 @@ fn real_cli_requires_opt_in_and_offline_never_reads_github() {
vec![
"fix_required_ci",
"fix_required_ci",
"wait_required_ci",
"wait_review",
"ready",
"add_removes",
Expand Down Expand Up @@ -243,7 +245,7 @@ fn behind_heads_wait_without_a_queue_and_keep_queue_composition() {
row["reviewDecision"] = "APPROVED".into();
row["latestOpinionatedReviews"] =
serde_json::json!({"totalCount":1,"nodes":[{"state":"APPROVED","commit":{"oid":"synthetic-head"}}]});
row["commits"] = serde_json::json!({"nodes":[{"commit":{"statusCheckRollup":{"contexts":{"totalCount":1,"nodes":[{"name":"ci","isRequired":true,"conclusion":"SUCCESS"}]}}}}]});
row["commits"] = serde_json::json!({"nodes":[{"commit":{"statusCheckRollup":{"contexts":{"totalCount":1,"nodes":[{"name":"ci","isRequired":true,"status":"COMPLETED","conclusion":"SUCCESS"}]}}}}]});
let mut actions = vec![];
for queued in [false, true] {
let mut first = detail.clone();
Expand Down Expand Up @@ -316,7 +318,7 @@ fn approval_required_block_has_an_actionable_wait_reason() {
row["mergeable"] = "MERGEABLE".into();
row["mergeStateStatus"] = "BLOCKED".into();
row["reviewDecision"] = "REVIEW_REQUIRED".into();
row["commits"] = serde_json::json!({"nodes":[{"commit":{"statusCheckRollup":{"contexts":{"totalCount":1,"nodes":[{"name":"ci","isRequired":true,"conclusion":"SUCCESS"}]}}}}]});
row["commits"] = serde_json::json!({"nodes":[{"commit":{"statusCheckRollup":{"contexts":{"totalCount":1,"nodes":[{"name":"ci","isRequired":true,"status":"COMPLETED","conclusion":"SUCCESS"}]}}}}]});
assert_eq!(
sample(&env, &detail)["board"]["entries"][0]["action"],
"wait_review"
Expand All @@ -328,7 +330,7 @@ fn unreported_classic_and_ruleset_requirements_are_pending() {
let (env, mut detail) = fixture();
let row = &mut detail["data"]["repository"]["p42"];
row["mergeable"] = "MERGEABLE".into();
row["commits"] = serde_json::json!({"nodes":[{"commit":{"statusCheckRollup":{"contexts":{"totalCount":1,"nodes":[{"name":"ci","isRequired":true,"conclusion":"SUCCESS"}]}}}}]});
row["commits"] = serde_json::json!({"nodes":[{"commit":{"statusCheckRollup":{"contexts":{"totalCount":1,"nodes":[{"name":"ci","isRequired":true,"status":"COMPLETED","conclusion":"SUCCESS"}]}}}}]});
for base in [
serde_json::json!({"refUpdateRule":{"requiredStatusCheckContexts":["ci","missing"]},"rules":{"totalCount":0,"nodes":[]}}),
serde_json::json!({"refUpdateRule":null,"rules":{"totalCount":1,"nodes":[{"type":"REQUIRED_STATUS_CHECKS","parameters":{"requiredStatusChecks":[{"context":"ci"},{"context":"missing"}]}}]}}),
Expand Down Expand Up @@ -706,7 +708,7 @@ fn opt_in_review_policy_observes_pinned_diff_and_authenticated_reviews() {
row["mergeable"] = "MERGEABLE".into();
row["comments"] = serde_json::json!({ "totalCount": 0, "nodes": [] });
row["commits"] = serde_json::json!({ "nodes": [{ "commit": {"statusCheckRollup":{"contexts":
{"totalCount":1,"nodes":[{"name":"ci","isRequired":true,"conclusion":"SUCCESS"}]}
{"totalCount":1,"nodes":[{"name":"ci","isRequired":true,"status":"COMPLETED","conclusion":"SUCCESS"}]}
}}}] });
row["latestOpinionatedReviews"] = serde_json::json!({
"totalCount": 2,
Expand Down Expand Up @@ -990,7 +992,7 @@ fn landing_shadow_holds_an_approved_head_on_unresolved_older_review() {
row["latestOpinionatedReviews"] =
json!({"totalCount":1,"nodes":[{"state":"APPROVED","commit":{"oid":head}}]});
row["commits"] = json!({"nodes":[{"commit":{"statusCheckRollup":{"contexts":{
"totalCount":1,"nodes":[{"name":"ci","isRequired":true,"conclusion":"SUCCESS"}]
"totalCount":1,"nodes":[{"name":"ci","isRequired":true,"status":"COMPLETED","conclusion":"SUCCESS"}]
}}}}]});
detail["data"]["repository"]["pullRequests"]["nodes"][0]["headRefOid"] = head.into();
fs::write(env.work().join("first.json"), detail.to_string()).unwrap();
Expand Down
Loading