core (python-hwpx) ships on its own cadence, independent of python-hwpx- automation's three-state promotion machine (that runbook lives in the
automation repo: docs/release-runbook.md there). This document exists
because the 6.1.0 release train (2026-08-15) almost shipped a public version
regression: a 112-commit feature branch had forked from main before a
security patch (6.0.3, GHSA-8g8m-xpm4-wxvx) published independently on
origin/main, and nobody checked the remote until the tag was about to be
pushed. Had it shipped as-is, users upgrading from 6.0.3 to 6.1.0 would have
silently lost a published security fix — a worse regression than either
version alone. git fetch at the very start of release prep would have
caught it a day earlier, with a small merge instead of a near-miss.
The same pattern repeated within hours, in the companion repo. While
promoting python-hwpx-automation's currentPublic coordinate to follow
core's 6.1.0, the push itself was rejected non-fast-forward: origin/main
had gained an unrelated CI commit since the local checkout was last synced.
This is not a core-specific risk — it recurs independently in every repo in
this three-repo ecosystem (core, automation, skill), and it recurs within a
single task, not only across sessions. §0 below applies to all three
repos, and at two points, not one.
The first action of any release-prep task, and of any long-lived branch's
work session, is git fetch origin followed by a diff against the branch's
own base — not the last step, not something the branch owner remembers to
do "eventually." A branch that forks and then lives for many commits (a
multi-cycle train, in this project's own vocabulary) is exactly the shape
that lets a fork-point drift unnoticed. Do this in whichever of the three
repos (python-hwpx, python-hwpx-automation/hwpx-mcp-server,
hwpx-skill/hwpx-plugins) the task touches — each has its own independent
origin/main and drifts independently.
git fetch origin
git log --oneline <branch>..origin/main
If that list is non-empty:
- Read every commit, not just the subject lines — a security release, a hygiene fix, or a coordinate change can hide behind an innocuous-looking subject.
- Merge, do not rebase, onto the feature branch (this project's own
history convention — see the 2026-08-15 merge commit
2e87583for the shape: resolve conflicts preserving both sides, verify with a defect- resurrection proof on anything security-relevant, re-run the full pre-tag checklist below on the merged tree before any tag). - If any upstream commit is itself a release (a version bump + tag), the version coordinate for the branch's own release must still order correctly above it (semver comparison, not date) and the CHANGELOG must fold the upstream release's own entry in, not overwrite or omit it.
Run the same check again immediately before pushing, not only at task start — the automation-repo incident above landed between those two points within a single work session. A rejected non-fast-forward push is the git-level guardrail when this second check is skipped, but relying on that guardrail means discovering the drift only after preparing a push that then has to be redone; checking first is strictly cheaper.
This applies at cycle start, not only at release-prep time — the earlier a divergence is caught, the smaller the merge.
Run all of these locally before any tag is pushed. This is the exact
sequence used for the 6.1.0 and 6.1.0-merge trains; skipping any single gate
locally while it still runs in CI is how a tag gets burned (see CHANGELOG.md
for the preserved-failed-tag record of trains that skipped one).
- Confirm the checkout.
git rev-parse --abbrev-ref HEADandgit log --oneline -1against the train's own branch — stale sibling worktrees in this workspace have produced wrong conclusions before. - Origin check (§0 above), merge if needed.
- Both ruff gates:
ruff check --select E9,F .(repo-wide) andruff check --select E4,E7,E9,Fagainst the specific scoped file list in.github/workflows/release.yml. python scripts/check_typing_generics_scope.py.mypyandpyright --pythonpath <venv>/bin/python— both, and pyright needs the explicit--pythonpathflag or it silently checks against the wrong interpreter and under-reports.python scripts/check_public_hygiene.py— catches internal codename leakage and private-origin markers baked into committed.hwpxgold fixtures (real-Hancom-captured fixtures can carry the capturing machine's own username inopf:metadata/lastsaveby; scrub by rewriting only that ZIP member's bytes, never touch the fixture's structural content).- The three
--checkscripts:scripts/error_code_census.py --check,scripts/coverage_ledger.py --check,scripts/editor_surface_inventory.py --check, plusscripts/sync_contract_docs.py --check. python -m hwpx.capabilities --verify.- Full test suite:
pytest -q --cov=hwpx --cov-report=term-missing --cov-fail-under=80. - Local build + install smoke:
python -m build,twine check dist/*, then install the built wheel into a throwaway venv (uv venv/uv pip install) and exercise a real round trip (author something, save, reopen) plus an import of anything the train specifically changed — this is the closest local proxy to the actual PyPI artifact users will get, and has caught issues neither the source-tree test suite nortwine checkalone would.
If core's version moves, decide — do not assume — whether python-hwpx- automation's MIN_PYTHON_HWPX floor and hwpx-skill's pinned core version
need to move too. Both questions are answered by reading the actual gate
code, not by the field names:
- automation's skew check (
quality.py) is a strict<comparison against the floor — a newer core satisfies an unmoved floor without triggering anything. - automation's
identity.jsonalso carriesreleaseState.candidate/currentPublic.pythonHwpx, which is a separate concept from the floor: it is "the currently externally-observed installable coordinate," and it legitimately advances on a core-only train even when automation's own version does not move (scripts/release_coordinates.py's own docstring in the automation repo documents two such precedents). Whether to promote it is a judgment call informed by that module, not a mechanical copy. - skill's core-version pin is derived from automation's own synced floor
(
tests/test_tool_contract_sync.py's hard-link assertion in the skill repo), not from core's latest release directly — it only moves when automation's floor moves.
Whichever way the judgment lands, state the reasoning and the file:line evidence in the commit message, not just the conclusion.
Each repo's test suite needs its own environment, not core's. Running
automation's suite without HWPX_ORACLE_STRUCTURAL_ONLY=1 wakes a live
Hancom-oracle code path that fails outside a properly permissioned macOS GUI
session — a run without it produced 12 unrelated-looking failures that
vanished under the correct environment (1481/1485 passed, 0 failed). Confirm
a suspicious failure is real by reproducing it with the repo's own documented
local-test invocation before reporting it as a regression, not by assuming a
bare pytest -q is equivalent everywhere.