Skip to content

fix(OMN-18595): release changelog generator strips bare OMN ticket refs - #4055

Merged
jonahgabriel merged 1 commit into
devfrom
jonah/omn-18595-release-changelog-strip-ticket-refs
Sep 24, 2026
Merged

jonahgabriel merged 1 commit into
devfrom
jonah/omn-18595-release-changelog-strip-ticket-refs

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes the release train CHANGELOG generator at the source so the next
scheduled cut clears the omnibase_core doc-content scan without a hand-applied
per-line suppression marker.

Problem

render_changelog_entry in scripts/ci/release_train.py embeds each
unreleased commit squash-merge subject verbatim into the release PR
CHANGELOG block. Every subject in this fleet routinely carries a bare
OMN-<digits> reference -- as the conventional-commit scope
(feat(OMN-19339): ...) or parenthetically (... (OMN-18157) (#1745)).
CHANGELOG.md is not under onex_change_control/ or contracts/, so the
omnibase_core doc-content scan TICKET_REFERENCE rule
(omnibase_core.validation.doc_content_scan.handler) flags every such line.

Confirmed live: omnibase_core#1746 (0.47.23, opened by the train
2026-09-24) hit this and was fixed by hand-appending the scan
doc-content-ok suppression marker to the two new CHANGELOG lines on the
release branch. That fix does not survive the next cut -- every future
release PR hits the same red until the generator itself changes.

Fix

_strip_ticket_references drops the bare OMN-<digits> token from each
commit subject before it is written into the CHANGELOG, handling both the
scope form and the parenthetical form. The PR-number citation
((#nnnn)) is left untouched -- this mirrors the precedent every hand-cut
CHANGELOG entry already set: PR-number-only traceability, no ticket id
(the existing v0.47.22 entries in omnibase_core/CHANGELOG.md are the
example).

This does not touch the scan or its escape hatches (doc-content-ok, the
onex_change_control/contracts path exemption) -- the check is correct for
a public-facing doc like CHANGELOG.md, so the generator is what moves.

Also declares the one pre-existing undeclared config/migration_classes.yaml
entry (.../0045_terminal_construction_outcome_metrics.sql, landed by an
unrelated PR, #3945) that was blocking every commit in this repo via the
always_run: true onex-check-migration-class pre-commit hook -- using the
checker own --suggest reading, unrelated to this change but landed in the
same PR per the pre-existing-violations policy.

Proof

Focused local tests, launching host (omnibase_infra, pytest -n0, not
directory-wide):

tests/scripts/test_release_train_changelog_ticket_refs.py .... 6 passed
tests/scripts/test_release_train_nightly.py ........................... 72 passed
tests/scripts/test_release_train_lab_ancestor_premise_omn18664.py ..... 18 passed

RED reproduced against the REAL scanner before writing the fix (not asserted
from the diff): loaded the pre-fix scripts/ci/release_train.py (via
git show origin/dev:...) and ran its render_changelog_entry output
through omnibase_core.validation.doc_content_scan.handler.scan_source --
flagged=True, two TICKET_REFERENCE findings (OMN-19339, OMN-18157).
Same call against the fixed generator output: flagged=False. A third
call, feeding the scanner an unstripped line directly, still flags it
(positive control -- the scan was not weakened).

uv run mypy scripts/ci/release_train.py --strict -- clean.
uv run ruff format/ruff check --fix on both touched files -- clean.
pre-commit run --all-files (via the commit) -- green after the
migration_classes.yaml entry above.

This is a scripts/ci/ tooling change with no runtime/src surface --
lab-first (rule 24) does not apply; nothing here runs in a deployed lane.

Evidence-Ticket: OMN-18595

Evidence-Source: OCC#11058

The scheduled release train changelog generator (render_changelog_entry)
embedded each unreleased commit subject verbatim, including its own
OMN-<digits> citation -- the conventional-commit scope form
(feat(OMN-19339): ...) or the parenthetical form (... (OMN-18157) (#1745)).
CHANGELOG.md is not under onex_change_control/ or contracts/, so the
omnibase_core doc-content scan TICKET_REFERENCE rule flags every such
line. Confirmed live: omnibase_core#1746 (2026-09-24) needed a hand-applied
doc-content-ok suppression marker per line on the release branch, which does
not survive the next cut.

Fixed at the source: _strip_ticket_references drops the bare ticket
reference from each subject before it is written, mirroring the precedent
every hand-cut CHANGELOG entry already set -- PR-number-only traceability
(e.g. "(#1736)"), no ticket id. The scan own escape hatches (doc-content-ok,
the onex_change_control/contracts path exemption) are untouched; this does
not weaken the check.

tests/scripts/test_release_train_changelog_ticket_refs.py: RED reproduced
against the real omnibase_core.validation.doc_content_scan.handler.scan_source
(pre-fix render_changelog_entry output flags OMN-19339 and OMN-18157); GREEN
after the fix, plus a positive control proving the scanner still catches an
unstripped reference.

Also declares the one pre-existing undeclared migration class entry that
blocked every commit in this repo (config/migration_classes.yaml), using
check_migration_class.py --suggest own reading -- unrelated to this fix,
landed in the same PR per standing policy on pre-existing violations.

Onex-Lane: reds-release
Onex-Session: 656a7e0a54b24d7aa19244eaceb519d9
@jonahgabriel
jonahgabriel enabled auto-merge (squash) September 24, 2026 10:51
@onexbot-occ-writer

Copy link
Copy Markdown
Contributor

No OCC evidence companion was minted for this PR.

this PR is already bound to OCC#11058; its evidence companion exists and nothing needs authoring

To clear this: Nothing to do — the companion already exists.

Reported by node_occ_companion_effect (decline code already_bound, OMN-16665). This decision was made against the PR's LIVE state at compute time, not at publish time — a green publisher job only means the command reached the broker.

@github-actions github-actions Bot 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.

Hostile Reviewer — adversarial findings (OMN-17492)

Models succeeded: glm-review
Models failed: codex
New finding threads: 0
Deduped (already posted on this PR): 0
Below quorum (one model only, reported not threaded): 4
Nit-level findings suppressed: 1

The model is the FINDER, never the gate: merge is gated only by the
deterministic Hostile Review Thread Gate, which blocks while
hostile-reviewer threads are unresolved. Resolve each thread after
addressing (or rejecting, with a reply) its finding.

Below quorum: 4 finding(s) raised by one model only (OMN-18479)

These are reported and NOT dropped, but they get no thread and do not block: a single model's finding no other model reproduced is not evidence enough to stop a merge. Read them; act on them if they are right.

  • [MAJOR] scripts/ci/release_train.py:_SCOPE_TICKET_REF (glm-review) — Scope regex fails for ticket-first multi-token scopes | _SCOPE_TICKET_REF only collapses scopes where the ticket is the sole token or the final comma-separated token. For 'fix(OMN-1234,ci): ...', the
  • [MINOR] scripts/ci/release_train.py:render_changelog_entry (glm-review) — Subject reduced to empty bullet when ticket ref dominates | _strip_ticket_references can produce an empty or nearly empty string (e.g. subject 'OMN-4242' or 're OMN-4242' after bare-strip leaves 're')
  • [MINOR] tests/scripts/test_release_train_changelog_ticket_refs.py:_scan_source (glm-review) — Hard import-time dependency on omnibase_core in test module | The test imports omnibase_core.validation.doc_content_scan.handler lazily via _scan_source, but there is no skip marker for environments w
  • [MINOR] scripts/ci/release_train.py:_strip_ticket_references (glm-review) — Silent mutation of commit subjects with no opt-out path | The change rewrites release-history subjects mechanically. Any ticket id appearing inside a quoted string, path, or otherwise user-meaningful

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Hostile Reviewer — DEGRADED (informational)

Critical findings: 0
Major findings: 2
Total findings: 8
Models succeeded: glm-review

Note: Fewer than 2 reviewer models succeeded. Degraded results are informational (OMN-8468/OMN-8524) and do not block merge. Error: cli_review exit 2 (fewer than 2 models succeeded — partial/total outage)


Semantics (OMN-17492 — the model finds, thread resolution gates)

Surface Meaning Blocks merge?
Review threads Per-finding, posted by the reviewer No (informational)
Hostile Review Thread Gate Deterministic: unresolved hostile-reviewer threads exist Fails until resolved (not yet a required context)
degraded verdict Fewer than 2 models succeeded (infra) No

Powered by omniintelligence.review_pairing.cli_review — multi-model adversarial review: qwen3-review, qwen3-review-b, glm-review (OMN-8468/OMN-8524/OMN-17492)

@github-actions github-actions Bot 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.

Hostile Reviewer — adversarial findings (OMN-17492)

Models succeeded: glm-review
Models failed: codex
New finding threads: 0
Deduped (already posted on this PR): 0
Below quorum (one model only, reported not threaded): 7
Nit-level findings suppressed: 1

The model is the FINDER, never the gate: merge is gated only by the
deterministic Hostile Review Thread Gate, which blocks while
hostile-reviewer threads are unresolved. Resolve each thread after
addressing (or rejecting, with a reply) its finding.

Below quorum: 7 finding(s) raised by one model only (OMN-18479)

These are reported and NOT dropped, but they get no thread and do not block: a single model's finding no other model reproduced is not evidence enough to stop a merge. Read them; act on them if they are right.

  • [MAJOR] scripts/ci/release_train.py, _SCOPE_TICKET_REF (glm-review) — Scope regex fails on ticket-first multi-token scopes, leaving malformed output | The docstring and comment claim "fix(OMN-1234,ci): ..." collapses to "fix: ...", but _SCOPE_TICKET_REF requires the OMN
  • [MAJOR] tests/scripts/test_release_train_changelog_ticket_refs.py, _scan_source and TestRenderChangelogEntryClearsTheScan (glm-review) — Test module hard-couples to an external package with no skip or isolation | _scan_source imports omnibase_core.validation.doc_content_scan.handler unconditionally. In any environment without that pack
  • [MINOR] scripts/ci/release_train.py, _strip_ticket_references (glm-review) — Bare-reference stripping leaves dangling punctuation and commas | _BARE_TICKET_REF removes only the OMN- token. Subjects like "fix: update OMN-1234, add tests" become "fix: update , add tests"
  • [MINOR] scripts/ci/release_train.py, render_changelog_entry (glm-review) — Subject reduced to empty string produces an empty changelog bullet | If a subject consists solely of a ticket reference, e.g. "(OMN-1234)", stripping yields an empty string and the changelog renders "
  • [MINOR] tests/scripts/test_release_train_changelog_ticket_refs.py (glm-review) — Module-level import-by-path executes the entire release_train script as a side effect | rt = _load() runs at collection time and exec_module executes the full scripts/ci/release_train.py top level. An
  • [MINOR] scripts/ci/release_train.py, _strip_ticket_references (glm-review) — Traceability loss: generated changelog drops internal ticket linkage silently | The change removes the only machine-readable link between a changelog entry and its tracking ticket. PR numbers survive
  • [MINOR] tests/scripts/test_release_train_changelog_ticket_refs.py, TestStripTicketReferences (glm-review) — No coverage for multiple ticket references or mixed scope-plus-inline forms | Tests cover one ticket per subject in one position each. Uncovered realistic shapes include a scope ticket plus an inline

@jonahgabriel
jonahgabriel merged commit 5864037 into dev Sep 24, 2026
264 of 280 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-18595-release-changelog-strip-ticket-refs branch September 24, 2026 13:29
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