Skip to content

ci(schema-parity): an exhausted walk-back tells a PR branched while dev was broken to merge dev in (#3395) - #4013

Merged
vybe merged 1 commit into
devfrom
AndriiPasternak31/3395-walkback-advice
Oct 28, 2026
Merged

vybe merged 1 commit into
devfrom
AndriiPasternak31/3395-walkback-advice

Conversation

@AndriiPasternak31

@AndriiPasternak31 AndriiPasternak31 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Part of #3395, which #3974 fixed on dev (the issue stays open until the release). A follow-up to #3974, from @dolho's review note on MAX_BASE_WALKBACK.

When the merge-base can't build its install, scripts/ci/check_sqlite_upgrade_parity.py walks back first-parent ancestors (bounded by MAX_BASE_WALKBACK = 20) and exits 2 once the walk is exhausted. Its message told every PR to "raise MAX_BASE_WALKBACK in the fix PR". That is the right advice for the one PR that repairs the base branch. Any other PR branched inside the broken range and checked after the fix landed gets the same wrong advice: its merge-base is still the broken commit, and what it needs is to merge the repaired base branch in, which moves the merge-base past the break with no change to the bound.

Changes

  • The exhausted-walk message now names both cases.
  • The comment on MAX_BASE_WALKBACK says only the fix PR can ever need a larger bound. The bound stays at 20: schema-parity has about 200 push runs on dev since mid-July with none failing, and 20 first-parent commits is roughly a day and a half of dev.
  • New self-test test_exhausted_walk_clears_once_the_repaired_base_is_merged_in: a PR branched inside the broken range, with the bound at 1, exits 2 and is told to merge the base branch in; after merging it, the guard passes from the fixed merge-base with no walk-back warning.
  • tests/registry.json: one sentence added to the existing entry's description.

No docs: CI-script message change (bug-fix tier).

Journey Impact: none: a CI guard's failure message and its self-test. No runtime code, endpoint, UI or migration behaviour changes.

Test Plan

Mutation: dev's scripts/ci/check_sqlite_upgrade_parity.py restored with the tests kept → tests/unit/test_sqlite_upgrade_parity_guard.py 1 failed, 26 passed (test_exhausted_walk_clears_once_the_repaired_base_is_merged_in, on the advice assertion).

Validation: tests/unit/test_sqlite_upgrade_parity_guard.py → 27 passed.

  • test_sqlite_upgrade_parity_guard.py test_schema_parity.py test_migrations.py test_alembic_parity_guard.py test_2338_journey_catalog.py → 131 passed under pytest-randomly seeds 11, 222 and 3333 (Python 3.12).
  • ruff clean on both files; mypy --strict clean on the script; tests/lint_sys_modules.py and tests/lint_root_test_placement.py pass; git diff --check clean; gitleaks over the branch commit found no leaks.

Unverified: not run under CI's Python 3.13 image (the change is a string and a test over synthetic git repositories); the full tests/unit tier was not run.

…ev was broken to merge dev in (#3395)

The exhausted-walk message advised "raise MAX_BASE_WALKBACK in the fix
PR". That is the right remedy for the PR that repairs the base branch,
and the wrong one for any other PR branched inside the broken range and
checked after the fix landed: its merge-base is still the broken commit,
and merging the repaired base branch in moves it past the break with no
change to the bound.

The message now names both cases, and the comment on MAX_BASE_WALKBACK
says that only the fix PR can ever need a larger bound. The bound stays
at 20.

New self-test: a PR branched inside the broken range, with the bound at
1, exits 2 and is told to merge the base branch in; after merging it,
the guard passes from the fixed merge-base with no walk-back warning.
Red against the previous message (the advice assertion), green now.

@vybe vybe 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.

merge-train: batch validated on train/20261028-0026 (train PR #4045 green: regression diff, journey-smoke, prod-image-smoke, pg-migrations, schema-parity, CodeQL, verify-non-root). Validated head 36c7098.

@vybe
vybe merged commit 4e3a3db into dev Oct 28, 2026
22 checks passed
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.

2 participants