Skip to content

fix(ci): run the merge train on GitHub Actions only, and hold stacked PRs until retargeted - #408

Merged
DrunkOnJava merged 6 commits into
mainfrom
fix/train-order
Oct 27, 2026
Merged

DrunkOnJava merged 6 commits into
mainfrom
fix/train-order

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

This PR makes the merge train run entirely on GitHub Actions, as Griffin set on 2026-10-27: "tests and builds should ONLY be running on a github runner and NEVER on this mac". The train now builds, tests and measures nothing on the machine it runs on.

  • refresh.sh only merges main into the PR. Conflicts in generated files resolve to main's version, docs/spec-coverage.md is regenerated (Python), and the result is pushed. The local build, the corpus run, the spec_examples update and the DXF oracle steps are gone, and so is the DRY mode, which rebuilt locally.

  • land.sh waits for the PR's own CI run. If the Corpus job fails, it calls ci_baseline.sh, which:

    1. downloads that run's corpus-measurement artifact;
    2. confirms the counts differ from the PR's committed baseline, since any other failure is handed back as a failure;
    3. refuses any count worse than main's baseline (exit 6);
    4. otherwise commits the measured baseline (measure.py baseline) and pushes.

    The wait then starts again on the new head, at most three times. If main moves under the PR in a path that can change counts, land.sh exits 8 and the train refreshes the PR again; the local dry check is gone.

  • train.sh holds a PR stacked on another PR's branch at the end of the queue until GitHub retargets it to main. This is the base check from this PR's first commit; that commit's lease retry went away along with the local build.

  • common.sh no longer sets a cargo target or corpus directory.

  • README and STATUS coverage stay current. ci_baseline.sh re-renders the coverage blocks with readme_status.py whenever they disagree with the baselines, citing the PR's own CI run. refresh.sh resolves a README or STATUS conflict to main's version when every conflicting line is rendered coverage text (readme3.py, tested on a table and marker conflict and on a prose conflict, which it refuses). The train already did this on this PR: its 684d474 re-renders README for the 61 drawings main pins.

  • A measurement is judged against the main it was refreshed onto (main.sha), so a main that moved during CI leads to a refresh rather than a false regression (Codex review).

The DXF oracle baseline is no longer rewritten on every refresh. Its ratchet in CI fails only on a fall or a missing row, which the PR's lane fixes. A rise leaves the committed baseline below the measured counts, which only loosens the ratchet. A periodic refresh from main's artifact catches it up.

Spec reference

Maintainer tooling only.

Test plan

  • bash -n on every train script.
  • Ran ci_baseline.sh on a real PR. feat(objects): decode the dynamic-block evaluation objects from AutoCAD's own DWG and DXF output (#152) #328's Corpus job had failed on bbd16ce, which carried main's baseline. The script downloaded CI run 40565038199's artifact, found 104 rows improved or new and 0 worse than main, committed the baseline, and pushed 93fcef2 (signed).
  • The base check, from this PR's first commit: in a stubbed run of train.sh (queue 1, 2, 3, with PR 2 targeting feat/x for its first two lookups), PR 2 waited at the end of the queue twice and landed once it targeted main.
  • The train restarted from this branch lands the queue on CI results only; the train log is the evidence.

Source-provenance declaration

By submitting this PR I certify that my contribution does not incorporate executable code from any source whose license is incompatible with Apache-2.0. Specifically:

  • No Autodesk DWG SDK source (RealDWG, ObjectARX, ObjectDBX) or NDA-protected Autodesk documentation was consulted or imported.
  • No Open Design Alliance Teigha / Drawings SDK source was consulted or imported. The ODA's public Open Design Specification for .dwg files PDF is explicitly allowed (see CLEANROOM.md).
  • No GPL-licensed DWG implementation source (LibreDWG, etc.) was consulted or imported. This matters because dwg-rs is Apache-2.0 and must remain compatible.

My contribution is based on:

  • The ODA's freely-redistributable Open Design Specification for .dwg files (v5.4.1);
  • Public reverse-engineering notes, research papers, or blog posts cited inline;
  • Reading algorithm-description comments (not executable code) in permissively-licensed projects (MIT / Apache / BSD) to resolve spec ambiguities — disclose any such reading in this PR body so it can be recorded in CLEANROOM.md.

See CLEANROOM.md for the full allowed/forbidden source list and the honest scope of what "clean-room" means for this project.

Developer Certificate of Origin

By submitting this PR, I certify that the contribution complies with the
Developer Certificate of Origin 1.1.
Specifically, I affirm that the contribution is my own work (or rightfully
licensed to me) and that it can be distributed under the project's Apache-2.0
license.

I will sign off commits with git commit -s when asked, which adds a
Signed-off-by trailer to the commit message asserting the DCO.

… hold stacked PRs

A lease the governor refuses is refused to every build on the machine, so
sending the PR to the end of the queue only reordered it: #384 lost the head
of the queue twice on 2026-10-27 and a PR stacked on it (#388) came up first.
A deferred PR now stays at the front and is retried after TRAIN_LEASE_WAIT
seconds, and a PR whose base is not main waits at the end of the queue until
GitHub retargets it.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-27T19:59:04.863620Z cc89619 New commits
ℹ️ 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.

…ting nothing locally

Griffin, 2026-10-27: "tests and builds should ONLY be running on a github
runner and NEVER on this mac". refresh.sh now only merges main, resolves the
generated files to main's and pushes. land.sh waits for the PR's own CI run;
when the Corpus job fails because the merge decodes other counts than the
committed baseline, ci_baseline.sh downloads that run's corpus-measurement
artifact, refuses any count worse than main's baseline, commits the measured
baseline and waits again. The DRY refresh, which rebuilt locally to decide
whether a PR survived main moving, is gone: main moving refreshes the PR, and
the lease retry is gone with the local build.
@DrunkOnJava DrunkOnJava changed the title fix(ci): keep the merge train's order when a build gets no lease, and hold stacked PRs fix(ci): run the merge train on GitHub Actions only, and hold stacked PRs until retargeted Oct 27, 2026

@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: 3381b1ce64

ℹ️ 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 tools/maintainer/train/land.sh Resolved
Comment thread tools/maintainer/train/refresh.sh Resolved
…aseline it measured, re-run cancelled runs

Codex on #408: a Corpus job that passes compares the merge only with the PR's
own baseline, so a PR committing worse counts would land; and a refresh that
took main's oracle TSV on a conflict silently dropped the PR's new rows, or
failed for good on a retired field. ci_baseline.sh now runs on every finished
Corpus job: it refuses any corpus count below main's baseline and any oracle
agreement below main's less the rows the PR retired (oracle_base.py, with the
PR head and merge base refresh.sh records), then commits the corpus baseline,
oracle.tsv and the oracle's coverage notes when they differ. land.sh re-runs a
run that was cancelled to free the runners.

@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: 556a1f9952

ℹ️ 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 tools/maintainer/train/ci_baseline.sh Resolved
…measurement against the main it was refreshed onto

Codex on #408: when main lands an improvement while a PR's CI runs, the older
measurement compared with the newer baseline is refused as a regression and
the PR is dropped. ci_baseline.sh now compares with the main recorded at the
refresh (oracle_base.py takes it too); land.sh's moved-main check refreshes
the PR when main has moved.

With some 25 decoder PRs to land, README.md and STATUS.md would go stale on
every landing: ci_baseline.sh renders their coverage again (readme_status.py,
citing the PR's own CI run) whenever it disagrees with the baselines, and
refresh.sh resolves a README or STATUS conflict to main's when every
conflicting line is rendered coverage text (readme3.py), refusing any other.
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 27, 2026 20:05
@DrunkOnJava
DrunkOnJava merged commit 66a9b4d into main Oct 27, 2026
25 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/train-order branch October 27, 2026 20:13
DrunkOnJava added a commit that referenced this pull request Oct 28, 2026
…10-27 (#416)

* docs: bring README, ROADMAP and CHANGELOG up to the landings of 2026-10-27

README's code-page and DXF writer text named work in review that has landed
(#371, #380, #382, #384); jev_review.py prose ranked those sentences 0.72 to
0.96. ROADMAP's "where it stands" table was a 2026-10-21 snapshot whose
numbers, CI row and release row were all out of date; it now points to the
rendered numbers instead of repeating them. CHANGELOG gains #371, #380, #382,
#384, #385 and #404.

* docs(changelog): record the CI-only merge train (#408)

* docs: OBJECTS landed (#372): README, ROADMAP and CHANGELOG

* docs: LAYOUT, GROUP and MLINESTYLE (#373), the class map writer (#405) and the double-byte round trip (#414) landed

* docs: VISUALSTYLE landed (#413)

* docs(readme): name the skipped types still in review without per-type counts; MATERIAL landed (#325)

* docs(readme): point to the open decoder PRs instead of a list that each landing makes stale
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant