Skip to content

Run the board reconcile twice, because adds and Status cannot land in one pass - #158

Merged
rocklambros merged 1 commit into
integrationfrom
ci/board-reconcile-two-pass
Sep 17, 2026
Merged

rocklambros merged 1 commit into
integrationfrom
ci/board-reconcile-two-pass

Conversation

@rocklambros

Copy link
Copy Markdown
Contributor

Follow-up to #157, fixing a defect I found by testing the merged workflow rather than one a reviewer would have caught from the diff.

The defect

A reconcile run that adds items cannot also set their Status.

Adding an item triggers project 9's own Item added to project workflow, which stamps a default Status asynchronously. apply_governance.py builds its entire plan before executing any of it, so on a run that adds anything it has already decided the Status actions before those items exist on the board. The default lands after the run finishes and nothing corrects it until the next run.

Measured, not theorised

On the 2026-09-17 backfill the first pass made 40 adds and 1 Status change. A second pass run immediately afterwards found 5 more Status corrections waiting:

Item Why the default was wrong
#135 status:accepted
#131 status:accepted
#126 open pull request, belongs in In progress
#113 open pull request
#112 open pull request

None of those five has the default as its correct Status, which is precisely the population a single pass strands. A third pass reported zero actions, so the tool converges, it just cannot converge in one run when it is also adding.

Nightly, that is up to 24 hours of a board reading Needs triage for work that is accepted or in flight. That is the failure the board exists to prevent, so shipping #157 without this would have left the automation quietly wrong in the one case it most needed to be right.

The fix

Run the board step twice under --apply. The dry-run path still runs once and returns, since printing the same plan twice helps nobody.

The reconciler is idempotent, so the second pass costs one API listing on a run that added nothing. Once Auto-add to project is enabled on the project, that is every run.

Note on review

I did not admin-merge this one. #157 was merged under the administrative authorisation given for it specifically, and extending that to a second change on my own judgement is the kind of thing that should be asked for rather than assumed. The workflow is inert until the App and environment exist, so there is no urgency in merging this ahead of a normal review.

… one pass

The workflow added in #157 left newly added items at the wrong Status for
a full day, and the cause is an ordering problem rather than a flaky API.

Adding an item triggers project 9's own "Item added to project" workflow,
which stamps a default Status asynchronously. `apply_governance.py` builds
its entire plan before executing any of it, so on a run that adds
anything it has already decided the Status actions before those items
exist on the board. The default lands after the run finishes, and nothing
corrects it until the next run.

Measured on the 2026-09-17 backfill. The first pass added 40 items and
made 1 Status change. A second pass immediately afterwards found 5 more
waiting: #135 and #131, both labelled `status:accepted`, and #126, #113
and #112, all open pull requests. None of those five has the default as
its correct Status, which is exactly the population a single pass strands.

Nightly, that is up to 24 hours of a board that reads Needs triage for
work that is accepted or in flight, which is the failure the board exists
to prevent.

The reconciler is idempotent and converges, verified by a third pass
reporting zero actions, so the second pass costs one API listing on any
run that added nothing. Once "Auto-add to project" is enabled on the
project that is every run.

Signed-off-by: Rock Lambros <rock@rockcyber.com>
@github-project-automation github-project-automation Bot moved this to Needs triage in ACS Project Tracker Sep 17, 2026
@rocklambros
rocklambros merged commit dc26547 into integration Sep 17, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Done in ACS Project Tracker Sep 17, 2026
@rocklambros
rocklambros deleted the ci/board-reconcile-two-pass branch September 17, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant