Skip to content

ci(lanes): run macOS/Windows integration legs on main only, with issue triage - #5928

Draft
kakkoyun wants to merge 26 commits into
mainfrom
ci/integration-macos-windows-main-only
Draft

kakkoyun wants to merge 26 commits into
mainfrom
ci/integration-macos-windows-main-only

Conversation

@kakkoyun

@kakkoyun kakkoyun commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

The macOS and Windows legs of the orchestrion.yml and otelc.yml integration lanes gate every classifier-matched pull request on 3-vCPU and shared 8-core runners, yet their recent catch record is thin (one macOS job, zero Windows jobs among the last six failing runs) while their cost is the largest in the repository: the otelc macOS leg alone accounts for roughly nineteen runner-hours per day at a 32-minute median (up to 96 minutes).

Pull requests and merge-queue branches now run the Ubuntu legs only (release-target pull requests and queue branches keep the full matrix, so a platform regression on a release still runs). The macOS and Windows legs move to main-based events, split into dedicated files with dedicated events around one shared lane body (orchestrion-lane.yml / otelc-lane.yml):

  • the newest push to main re-runs them minutes after landing (superseded runs are cancelled; the nightly is the guaranteed full matrix),
  • release branches and cross-repository calls keep their coverage.

A new ci-lane-triage.yml workflow turns failures of those legs into deduplicated issues for the apm-go team (citing the failing commit, the run, and the Datadog CI query), closes them when a leg goes green — only when its run is the lane's newest completed on main — closes issues whose legs left the matrix, keeps a tracking issue with each lane's last status, and alerts when a lane goes 26 hours without a run on main. Every GitHub read in the triage script retries and fails loudly rather than swallowing.

The macOS legs stay on the standard arm64 runners in this layer; #5929 (stacked) moves the otelc macOS legs to a larger runner. Ubuntu runs on the shared 8-core larger runner and Windows on the shared windows-shared-8core fleet, as before.

Cost

Measured 2026-11-09 to 2026-11-17: the macOS and Windows legs of both lanes consumed roughly 49 runner-hours per day on pull requests (the otelc macOS leg alone ~19 h/day) for one macOS catch and zero Windows catches. After this PR they run only on main-based events: at the measured ~5 merges per day plus the nightly, that is roughly 3 full-matrix runs per day — about 5 runner-hours — a net reduction of ~44 runner-hours per day, with the trade that a platform regression lands first and is reported by issue instead of blocking the PR. At the before-cost figures the break-even would sit at 12 to 18 merges per day; the intended follow-up is a changed-components push mode that diffs HEAD^1..HEAD, so a merge that does not touch platform-relevant code runs the Ubuntu legs only.

Rejected alternatives

  • One lane file with an inline per-event matrix conditional (the first draft of this PR): rejected as unreadable — the reviewer's words — and replaced by the dedicated callers.
  • Two full copies of each lane (a PR file and a main file): rejected — around 800 duplicated lines that the cache-policy PRs (ci(cache): seed the macOS-heavy lanes, restore modules only on Windows #5908/ci(windows): provision a Dev Drive for the Go caches #5907) are already editing.
  • A shared concurrency group for the triage workflow: rejected — a newer pending run would cancel an older one before it opens its issue; self-healing dedup was chosen instead.
  • Locking the issue creation: rejected for the same reason; healing converges to one issue without dropping any triggering run.

Verification

Check Result
./scripts/lint.sh --action (actionlint) pass
./scripts/lint.sh --misc (copyright, ciselect, citiming, actiontest, checkmake) pass
go test ./scripts/ciselect/ -count=1 (incl. TestIntegrationLanesMacWindowsMainOnly, the queue tests, the new filter test) pass
gofmt, go vet, shellcheck (now also over .github in CI) pass

APMLP-2250

Notes for reviewers

  • Merge order: this stack should land after ci(windows): provision a Dev Drive for the Go caches #5907/ci(cache): seed the macOS-heavy lanes, restore modules only on Windows #5908 (cache policy and Windows Dev Drive) so the post-fix baseline can be measured; expect a rebase of those onto the split (their hunks port into the -lane.yml bodies).
  • Branch protection: the PR callers now end in a top-level join with each lane's old check name (Orchestrion Integration Tests, OTelc Integration Tests), so rules on those names keep resolving; the Check Pull Request CI Status gate evaluates only the checks that exist.
  • Triage activation: ci-lane-triage.yml fires on workflow_run from the default branch, so it starts working only after this merges.
  • Style debt (pre-existing, not from this PR): the lane bodies carry the long lines they had on main (the runner-mapping expression, the step commands), kept verbatim so the move reads as a move.

@kakkoyun
kakkoyun added this pull request to stack #5930 November 19, 2026 17:37
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 74.19% (+7.05%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 23dea43 | Docs | View more details | Give us feedback!

@kakkoyun

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T09:49:47.163007Z 8720221 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-20T09:53:22.310558Z 8720221 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a1d531499d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci-lane-triage.yml Resolved
Comment thread .github/scripts/lane-triage.sh Resolved
Comment thread .github/scripts/lane-triage.sh Resolved
@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: a1d531499d

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@dd-octo-sts dd-octo-sts Bot mentioned this pull request Nov 20, 2026
The macOS and Windows legs of the orchestrion and otelc integration
lanes gate every classifier-matched pull request on 3-vCPU and shared
8-core runners, yet their recent catch record is thin (one macOS job,
zero Windows jobs among the last six failing runs) while their cost is
the largest in the repository: the otelc macOS leg alone accounts for
roughly nineteen runner-hours per day at a 32-minute median (up to 96
minutes).

Instead of one file per lane branching inline on the event, each lane
now has dedicated files with dedicated events, sharing one lane body:

- orchestrion-lane.yml / otelc-lane.yml: the lane body (classifier,
  matrices, services, tests, joins), a reusable workflow taking an
  os-list input; the caller's github context flows in, which the
  classifier and the cross-repository checkout rely on.
- orchestrion-pr.yml / otelc-pr.yml: pull requests (and the merge
  queue for orchestrion) run the ubuntu legs only.
- orchestrion.yml / otelc.yml: main-based events (push to main or
  release-v*, nightly schedule, dispatches, and the cross-repository
  call for orchestrion) run the full OS matrix, so every merge
  re-runs the macOS and Windows legs minutes after landing.

A new ci-lane-triage.yml workflow turns failures of those main-based
legs into deduplicated issues for the apm-go team, closes them when a
leg goes green, keeps a pinned tracking issue with each lane's last
status, and alerts when a lane goes 26 hours without a run on main.

[APMLP-2250]
@kakkoyun
kakkoyun force-pushed the ci/integration-macos-windows-main-only branch from a1d5314 to 8720221 Compare November 20, 2026 09:34
@kakkoyun
kakkoyun marked this pull request as ready for review November 20, 2026 09:46
@kakkoyun
kakkoyun requested review from a team as code owners November 20, 2026 09:46

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 87202210a5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/orchestrion.yml Resolved

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

Ordinary Orchestrion events forward an absent value into a boolean reusable-workflow input, preventing the full matrix from starting. Triage can also miss timeouts, close newer failures on stale successes, and create duplicate issues during overlapping runs.

Open Bits AI session

🤖 Bits Code Review · Commit 8720221

Comment thread .github/workflows/orchestrion.yml Resolved
Comment thread .github/scripts/lane-triage.sh Resolved
Comment thread .github/scripts/lane-triage.sh Resolved
Comment thread .github/workflows/ci-lane-triage.yml Resolved
Comment thread .github/scripts/lane-triage.sh Resolved
Four review threads on the head commit, all real:

- orchestrion.yml forwarded inputs.collect-coverage to the lane's
  boolean-typed input as an empty value on push, schedule and dispatch
  runs (the input exists only for workflow_call), which the reusable
  invocation rejects. It now defaults to false for those events while
  cross-repository callers keep their value.
- Two triage runs finishing close together could both observe that no
  issue exists and both create it, for the tracking issue and for
  failure issues of overlapping runs. The script now heals the race
  after every create: keep the lowest-numbered issue, close the rest as
  duplicates.
- A macOS or Windows leg that exceeded its job timeout is recorded as
  timed_out, not failure, so a platform-specific hang opened no issue
  at all. The failure set now includes timed_out.
- An older successful run whose triage finished after a newer failure
  closed the newer issue and announced a recovery that never happened.
  A green leg now only closes its issue when its run is the lane's
  latest on main.

The four callers also drop secrets: inherit: the lane bodies consume no
repository secrets (their credentials come from the OIDC dd-sts
action), so least privilege wins.

[APMLP-2250]
The failure attribution took the second-newest main-based run as the
predecessor, but another run can start before the failing one finishes,
which puts the failing run itself (or a newer run) at that index and
attributes the regression to the wrong commit. The lookup now finds
the triggering run in the list and takes the entry after it.

[APMLP-2250]

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The PR moves macOS/Windows integration checks to main-based events, retains Ubuntu checks on PRs, and adds failure triage. Boolean forwarding, missed timeouts, stale recovery, duplicate issues, and incorrect predecessor attribution are addressed. No findings remain open.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit c5ea43e

@darccio darccio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. Additionally:

  • Add CODEOWNERS rules for the two new orchestrion workflow files.

    The suffix rule *orchestrion.yml no longer matches orchestrion-lane.yml or orchestrion-pr.yml, so review requests for the 400-line lane body stop reaching @DataDog/apm-orchestrion and the owner check passes either way.

    /.github/workflows/orchestrion-lane.yml   @DataDog/apm-orchestrion
    /.github/workflows/orchestrion-pr.yml     @DataDog/apm-orchestrion
    

Comment thread .github/AGENTS.md Resolved
Comment thread .github/scripts/lane-triage.sh Resolved
Comment thread .github/scripts/lane-triage.sh Resolved
Comment thread .github/scripts/lane-triage.sh Resolved
Comment thread .github/scripts/lane-triage.sh Resolved
Comment thread scripts/ciselect/rules_test.go Resolved
Comment thread scripts/ciselect/workflows_test.go Resolved
Comment thread scripts/ciselect/workflows_test.go Resolved
Comment thread scripts/ciselect/workflows_test.go Resolved
Comment thread scripts/ciselect/workflows_test.go Resolved
…windows-main-only

# Conflicts:
#	.github/workflows/otelc.yml
Dario's 26 review threads, all addressed:

- lane-triage.sh: every gh read now goes through a retrying read_gh
  helper that fails the job loudly instead of swallowing transient API
  errors; find_issue resolves to the single lowest-numbered open issue;
  the open loop skips legs a newer completed run already has green, so
  a recovered regression no longer pings the team; the predecessor
  lookup skips cancelled and empty conclusions; the status counts and
  the triage loops share one LEG_WORDS regex and one jobs fetch; the
  dead BSD date fallback under set -e is gone; the tracking table
  links issues with #; the tracking body is built once with the footer
  and a closed tracking issue is reopened instead of duplicated;
  issues whose legs left the matrix are closed so a Go release bump
  strands nothing under Open failures.
- ci-lane-triage.yml: the header bullets state what the script does;
  the fork guard no longer claims workflow_call runs.
- The PR callers pass the full OS list when the target is a release
  branch (pull request or queue branch), so a platform regression on a
  release no longer gates nothing; each PR caller adds a top-level
  join with the lane's old check name, so a branch protection rule on
  it keeps resolving.
- orchestrion.yml: the dispatch trigger declares the
  orchestrion-version input the header promised; both main-file
  headers state the newest-push semantics of the shared concurrency
  group. The generate-job comment matches its condition again, and
  the rewrapped matrix comment keeps its indentation.
- static-checks.yml: the shellcheck job also covers .github, which is
  the only lint the triage script has.
- Tests: the main-file block asserts no pull_request trigger exists;
  the queue check uses branchListRunsQueueBranch instead of one exact
  string; laneOSList fails by name instead of panicking; the queue
  test comment matches the ungated Ubuntu run; a new test pins the
  triage workflow_run filter to the lanes' name: values; five stale
  pointers now name otelc-lane.yml.
- AGENTS.md: the lane policy documents the dispatch escape hatch for
  contributors touching platform-sensitive code.

[APMLP-2250]

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

The PR separates Ubuntu PR checks from main-based platform coverage and adds triage; earlier findings remain resolved. Open issues are a blocking jq conversion error, retry-output contamination, malformed retired-issue IDs, unfinished-run selection, unsafe cleanup after matrix-expansion failure, and shellcheck being skipped for script-only changes.

Open Bits AI session

🤖 Bits Code Review · Commit 5334310

Comment thread .github/scripts/lane-triage.sh Resolved
Comment thread .github/scripts/lane-triage.sh Resolved
Comment thread .github/scripts/lane-triage.sh Resolved
Comment thread .github/scripts/lane-triage.sh Resolved
Comment thread .github/scripts/lane-triage.sh Resolved
Comment thread .github/ci-components.yml Resolved
@kakkoyun
kakkoyun requested a review from darccio November 24, 2026 13:13
The retry helper logged to stdout, so a recovered read prefixed its
diagnostic to the captured response and every jq parse of it failed;
the log goes to stderr now. The job-conclusion map wrapped its entries
in an object, which from_entries rejects, so every caller aborted
before opening an issue; it takes the entries array directly. The
newest-completed selection and the predecessor lookup accepted empty
conclusions, so queued and running runs counted as completed; both
exclude them now. The retired-leg loop read the whole tab-separated
record as the issue number, so the close always failed; it reads the
number and the title separately. And leg retirement now requires a
successful run: a failed matrix job enumerates no platform jobs, and
retiring every issue then would erase the failures the run should
have reported.

[APMLP-2250]
The shellcheck step that covers .github lives in the lint job, gated
by static-lint, while a change confined to lane-triage.sh enabled only
static-actions — so a script-only pull request skipped the very lint
coverage the step adds. The lane-triage component now enables
static-lint as well.

[APMLP-2250]

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The PR moves macOS/Windows checks to main-based events, retains Ubuntu PR checks, and adds failure triage. The final lint-gate fix enables shellcheck for script-only PRs; previously reported triage and input-handling defects remain resolved. No findings remain open.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit dba052c

…windows-main-only

The cache-policy (#5908) and Windows Dev Drive (#5907) changes to the
orchestrion and otelc lane bodies are ported into orchestrion-lane.yml
and otelc-lane.yml verbatim: the isolated-cache wiring of the
integration-test setup-go calls (cache and seed, Windows skipped, the
stable-alias seed gates) and the otelc GOCACHE export that puts the
instrumented builds into the shared cache. The thin main-based callers
stay as this branch wrote them.

[APMLP-2250]
The seed-literal counts and the per-OS cache policy test that #5908
added still read the old single-file names; the wiring now lives in
orchestrion-lane.yml and otelc-lane.yml.

[APMLP-2250]

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

The PR moves macOS/Windows coverage to main-based runs, retains Ubuntu PR checks, and adds failure triage; earlier findings remain resolved. Cache-policy tests introduced by the new base still inspect the caller workflows instead of the shared lane files, causing deterministic failures in the static-check gate.

Open Bits AI session

🤖 Bits Code Review · Commit 87ca50d

Comment thread .github/workflows/orchestrion.yml Resolved
Three review threads on the propagation rework:

- Errexit is disabled inside a command substitution, so the failed
  assignments in tracking_body and its peers kept rendering and the
  dashboard edit still succeeded with empty content. Every
  multi-statement function invoked in a substitution (tracking_body,
  newest_green_legs, issue_body, commit_line) now runs with an
  explicit set -e inside it, so a read that exhausts its retries
  aborts the rendering; a direct assignment of that substitution
  stops the job before any edit.
- The PR callers were missing from joinJobs, so the join-name
  assertions added last round never executed: deleting either
  required join still passed the guard. Both callers are listed now
  and the assertions run.
- Reopening a closed issue repairs a stale close only before it
  happens. The green loop now re-verifies the newest-run guard per
  close, so a triage that paused while a newer failure completed and
  triaged no longer closes that failure's reopened issue; the failure
  path's reopen covers the complementary interleaving.

[APMLP-2250]

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

The PR moves macOS/Windows checks to main-based runs with issue triage; loop initialization, dashboard error propagation, and required-check-name assertions are now fixed. Two issues remain: stale recoveries can still close newer failures, and failed issue-body rendering can create empty issues without run links or a team mention.

Open Bits AI session

🤖 Bits Code Review · Commit 629e428

Comment thread .github/scripts/lane-triage.sh Resolved
Comment thread .github/scripts/lane-triage.sh Resolved
A failed command substitution in an argument position does not stop
the command it feeds: gh issue create ran with an empty body when
issue_body aborted, losing the run links, the commit and the team
mention. The body renders into a checked assignment first, so a
failed render stops the job before anything is created.

The per-close freshness check still raced the API operations around
it: an older green triage could pass it, pause, and close an issue a
newer failure had reopened and updated meanwhile. Recovery now
reconciles against the issue's own record instead of another
freshness check: any run id above this run's, in the body or the
comments, means a newer failure spoke on record, and closing would
bury it. The complementary interleaving stays covered by the failure
path's reopen.

[APMLP-2250]

@rarguelloF rarguelloF left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CODEOWNERS rules for orchestrion-lane.yml and orchestrion-pr.yml are still missing, so *orchestrion.yml no longer sends them to @DataDog/apm-orchestrion.

Comment thread .github/workflows/orchestrion-pr.yml Resolved
Comment thread .github/workflows/orchestrion-pr.yml Resolved

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

The PR moves macOS/Windows checks to main-based runs with issue triage. Loop initialization, dashboard error propagation, required-check-name assertions, and empty-issue creation are fixed; recovery can still close newer failures after checking history, and failed history reads now permit closing without verification.

Open Bits AI session

🤖 Bits Code Review · Commit e677bfd

Comment thread .github/scripts/lane-triage.sh Resolved
Comment thread .github/scripts/lane-triage.sh Resolved
RarguelloF's two threads and the bot's two:

- The merge-queue push trigger carried a tags-ignore block from the
  old single-file lane, so release tag pushes like v2.13.0-rc.1 also
  ran this workflow — a second, ubuntu-only run of every suite on
  top of the full matrix orchestrion.yml already runs on those tags
  (the old lane did exactly that this week). The block is gone: the
  trigger is merge-queue branches only.
- The outer join's comment now states the real reason it exists: the
  lane's own join reports as "lane / <lane> Integration Tests" inside
  the reusable workflow, which no branch protection rule matches, and
  it is gated on the classifier while the outer one runs on
  !cancelled() so the bare name always reports.
- The issue-history read converted a failed read into an empty
  record, which reads as "no newer failure" and closed an issue whose
  history could not be verified. The read failure now aborts the
  recovery.
- The history check still raced the close that followed it. The close
  is now reconciled after the mutation too: a newer failure recorded
  while the close was in flight reopens the issue, and a failure
  recording after the post-close re-read is covered by its own
  triage's reopen — every interleaving converges to the newer state.

[APMLP-2250]
The commit_line wrappers were inline while the other three used the
block form; formatting only, no semantic change — verified by the
suites.

[APMLP-2250]

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

The PR moves macOS/Windows checks to main-based runs with issue triage; loop inputs, dashboard and issue-body error handling, check-name assertions, and failed history reads are fixed. Two ordering defects remain: late failure comments can leave issues closed, and newer recovery comments can reopen healthy issues.

Open Bits AI session

🤖 Bits Code Review · Commit 532273f

Comment thread .github/scripts/lane-triage.sh Resolved
Comment thread .github/scripts/lane-triage.sh Resolved
The reconciliation read every run URL in the issue, so a newer
recovery comment ("Green again") read as a newer failure: an older
triage then reopened the healthy issue a newer recovery had already
closed. Only failure records count now — the body's "Failing run"
line and every "Failed again" comment — so recoveries reconcile as
recoveries.

The failure path could also pause between its lookup and its
comment, and a stale recovery could close the issue in that window;
the resumed triage then commented on a closed issue and left it
closed. The failure path now reopens after commenting — a no-op when
the issue is open, and a guarantee that a failure on record always
ends with the issue open. Every interleaving of the two paths now
converges to the newest state.

[APMLP-2250]

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

The PR moves macOS/Windows checks to main-based runs with issue triage; failure-comment reopening and recovery-comment filtering address the earlier findings. Two new defects remain: an older failure can reopen an issue after a newer recovery, and ignored reopen errors can leave current failures closed without failing triage.

Open Bits AI session

🤖 Bits Code Review · Commit 38c2de2

Comment thread .github/scripts/lane-triage.sh Resolved
Comment thread .github/scripts/lane-triage.sh Resolved
The failure path's reopen was unconditional and error-suppressed. An
older failure triage could comment, pause while a newer successful
triage closed the issue (a real recovery), and then reopen the healthy
closed issue. The reopen now skips when a newer run's Green again is
on record, and reads the live state first: gh fails a reopen of an
open issue, so the no-op case never reaches the error path, while a
real reopen failure stops the job instead of reporting success with
the failure left hidden.

[APMLP-2250]

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

The PR moves macOS/Windows checks to main-based runs with issue triage; reopen failures now propagate, and prior validation and rendering fixes remain intact. One ordering defect remains: an older failure can reopen a healthy issue before the new recovery guard runs, leaving it open despite a newer successful recovery.

Open Bits AI session

🤖 Bits Code Review · Commit bb077c5

Comment thread .github/scripts/lane-triage.sh Resolved
The closed-issue branch of the failure path reopened unconditionally:
a newer recovery could close the issue after the green-leg snapshot
but before this triage's lookup, and that reopen restored the healthy
issue before the guarded reopen ever ran. Both failure-path reopens
now go through one helper that skips when a newer run's recovery is on
record and reopens only a genuinely closed issue.

[APMLP-2250]

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

The PR moves macOS/Windows checks to main-based runs with issue triage; earlier rendering, check-name, and API-error fixes remain intact. Both failure-path reopens now share a guard, but an older failure can still reopen a healthy issue when a newer recovery finishes between the history read and the mutation.

Open Bits AI session

🤖 Bits Code Review · Commit 9d82b17

Comment thread .github/scripts/lane-triage.sh Resolved
The guarded reopen checked the recovery record, then paused could let
a newer success close the issue before the reopen ran, and the reopen
restored the healthy issue. The helper now re-reads the record after
the reopen and closes the issue again when a newer recovery recorded
in the meantime; a recovery recording after that re-read is already
covered by the close path's own post-mutation check.

[APMLP-2250]

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

The PR moves macOS/Windows checks to main-based runs with issue triage; the earlier reopen race is addressed and prior error-handling fixes remain intact. One ordering defect remains: the new corrective close can use an intermediate recovery to close an issue after a still-newer failure has already been reported.

Open Bits AI session

🤖 Bits Code Review · Commit 318f481

Comment thread .github/scripts/lane-triage.sh Resolved
The corrective close accepted any recovery newer than the triggering
run, so a failed run whose triage lagged behind a recovery and a
still-newer failure closed the current failure issue: fail 100,
recover 101, fail 102 — run 100's triage saw 101, closed, and buried
102. The close now compares the newest failure against the newest
recovery in the issue's record and closes only when the recovery is
the newest record of either kind.

[APMLP-2250]
…windows-main-only

The otelc pin bump (#5974) lands in the lane body, and the
INTEGRATIONS.md and feature-gaps rewrites keep main's new text with
the lane-file retargets: OTELC_VERSION, OTELC_MODULES and
OTELC_TEST_PACKAGES live in otelc-lane.yml.

[APMLP-2250]

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

The PR moves macOS/Windows checks to main-based runs with issue triage; earlier rendering and API-error fixes remain intact. Three issues remain: corrective closes can race newer failures, failed record lookups are swallowed, and post-close reconciliation can reopen issues despite a still-newer recovery.

Open Bits AI session

🤖 Bits Code Review · Commit 693a8d1

Comment thread .github/scripts/lane-triage.sh Resolved
Comment thread .github/scripts/lane-triage.sh Resolved
Comment thread .github/scripts/lane-triage.sh Resolved
Three review threads on the newest-record helpers:

- The record lookup's failure inside a command substitution only
  ended the substitution: read consumed the empty here-string, both
  ids defaulted to zero, and reconciliation closed an issue whose
  record could not be read. The lookup is captured with a checked
  assignment now, so a failed read aborts the job.
- issue_has_newer_failure accepted any newer failure, ignoring later
  recoveries: green 100 closes, fail 101 reopens, green 102 closes —
  the post-close check reopened on 101 and left the healthy issue
  open. A newer failure now counts only when it is also newer than
  the newest recovery.
- The corrective close's snapshot could go stale while a failure
  recorded after it: the close now reconciles after the mutation too,
  reopening when a newer failure is the newest record. A failure
  recording after that re-read is covered by its own triage's
  reopen.

[APMLP-2250]

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

The PR moves macOS/Windows checks to main-based runs with issue triage; record-read error propagation, latest-recovery comparison, and the reported corrective-close case are fixed. One ordering defect remains: the added final reopen can override a still-newer recovery and leave a healthy issue open.

Open Bits AI session

🤖 Bits Code Review · Commit 70062a2

Comment thread .github/scripts/lane-triage.sh Resolved
The corrective reopen after a stale close had no reconciliation of its
own: a recovery recording between its snapshot and the reopen left
the healthy issue open. The reopen now re-reads the records and closes
again when a recovery is the newest record. One corrective inverse per
mutation; the residual write-to-re-read window is covered by the next
triage of the recording run.

[APMLP-2250]

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

The PR moves macOS/Windows checks to main-based runs with issue triage; the reported final-reopen sequence is now reconciled, and earlier error-handling fixes remain intact. One ordering defect remains: the added final close can hide a newer failure whose triage already finished after the history snapshot.

Open Bits AI session

🤖 Bits Code Review · Commit 23dea43

if [ "$latest_green" -gt "$latest_fail" ] \
&& [ "$latest_green" -gt "$RUN_ID" ]; then
log "newer recovery recorded during reopen: closing #$issue"
gh issue close "$issue" --repo "$REPO" \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Coordinate the final close with newer failure triages

After this snapshot selects recovery 103, failed run 104 can reopen the issue, record its failure, and finish triage before this close executes. The older triage then hides that current failure, with no subsequent reconciliation. A focused mocked ordering reproduced the final closed state. Coordinate issue mutations so an older triage cannot overwrite a newer completed triage; another fixed inverse mutation only moves the race window.

React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it

What each reaction means
  • 👍 Useful: correct, and you're fixing it or will.
  • 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.
  • 😕 Unclear: you can't tell what it means or why it matters.
  • 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.

🤖 Bits Code Review · Open Bits AI session

@kakkoyun

Copy link
Copy Markdown
Member Author

/remove

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-11-25 18:24:28 UTC ℹ️ Start processing command /remove


2026-11-25 18:24:31 UTC

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants