fix(release): gitea_release_assistant validate_semver/preview_notes always answer "Preflight complete" #31

Closed
opened 2026-10-24 00:59:22 +00:00 by dsh · 1 comment
Owner

Symptom

gitea_release_assistant returns Release Assistant: Preflight complete (no check details returned). for every action except preflight, so validate_semver and preview_notes look like they ran a preflight and found nothing. The actual validation/notes payload is discarded.

Repro

gitea_release_assistant {action:"validate_semver", currentVersion:"0.7.40-dsh.7", targetVersion:"0.8.0"}
→ Release Assistant: Preflight complete (no check details returned).

gitea_release_assistant {action:"preview_notes", currentVersion:"0.7.40-dsh.7", targetVersion:"0.8.0"}
→ Release Assistant: Preflight complete (no check details returned).

gitea_release_assistant {action:"preflight", currentVersion:"0.7.40-dsh.7", targetVersion:"0.8.0"}
→ Release Assistant: Preflight 5/5 passed.

Observed vs expected

  • Observed: the validate_semver reply names a different action and omits the version pair/bump type. preview_notes hides the generated en/ru/zh notes.
  • Expected validate_semver: Valid minor bump from 0.7.40-dsh.7 to 0.8.0 (or the validation error). Expected preview_notes: the generated release notes (or a short preview) per language.

Root cause

lib/release-assistant.js returns { ok: true, data: validateSemverBump(...) } for validate_semver and { currentVersion, targetVersion, notes: {en,ru,zh} } for preview_notes. lib/handlers/formatters.js only handles the preflight shape:

if (name === 'gitea_release_assistant') {
  if (!Array.isArray(data.checks)) {
    return [{ type: 'text', text: 'Release Assistant: Preflight complete (no check details returned).' }]
  }
  ...
}

Proposed fix

Add per-action formatter branches: validate_semver (current → next, bump type, or the error), preview_notes (language headings + notes, capped), and keep preflight as is. Tests for all three payload shapes.

Acceptance: validate_semver prints the bump/validation result; preview_notes prints notes; neither mentions preflight.

Duplicate check

Searched release (state all) — #12/#28-adjacent but no assistant-output issue.

Layer

dsh-gitea plugin/tool (formatter).

## Symptom `gitea_release_assistant` returns `Release Assistant: Preflight complete (no check details returned).` for every action except `preflight`, so `validate_semver` and `preview_notes` look like they ran a preflight and found nothing. The actual validation/notes payload is discarded. ## Repro ``` gitea_release_assistant {action:"validate_semver", currentVersion:"0.7.40-dsh.7", targetVersion:"0.8.0"} → Release Assistant: Preflight complete (no check details returned). gitea_release_assistant {action:"preview_notes", currentVersion:"0.7.40-dsh.7", targetVersion:"0.8.0"} → Release Assistant: Preflight complete (no check details returned). gitea_release_assistant {action:"preflight", currentVersion:"0.7.40-dsh.7", targetVersion:"0.8.0"} → Release Assistant: Preflight 5/5 passed. ``` ## Observed vs expected - Observed: the `validate_semver` reply names a different action and omits the version pair/bump type. `preview_notes` hides the generated en/ru/zh notes. - Expected `validate_semver`: `Valid minor bump from 0.7.40-dsh.7 to 0.8.0` (or the validation error). Expected `preview_notes`: the generated release notes (or a short preview) per language. ## Root cause `lib/release-assistant.js` returns `{ ok: true, data: validateSemverBump(...) }` for `validate_semver` and `{ currentVersion, targetVersion, notes: {en,ru,zh} }` for `preview_notes`. `lib/handlers/formatters.js` only handles the preflight shape: ```js if (name === 'gitea_release_assistant') { if (!Array.isArray(data.checks)) { return [{ type: 'text', text: 'Release Assistant: Preflight complete (no check details returned).' }] } ... } ``` ## Proposed fix Add per-action formatter branches: `validate_semver` (current → next, bump type, or the error), `preview_notes` (language headings + notes, capped), and keep `preflight` as is. Tests for all three payload shapes. Acceptance: `validate_semver` prints the bump/validation result; `preview_notes` prints notes; neither mentions preflight. ## Duplicate check Searched `release` (state all) — #12/#28-adjacent but no assistant-output issue. ## Layer dsh-gitea plugin/tool (formatter).
Author
Owner

Fixed in b74ca23 (PR #43).

The formatter branches on the payload: validate_semver → Release Assistant: valid minor bump from 0.7.40-dsh.7 to 0.8.0. (or the validation error); preview_notes → English/Russian/Chinese note blocks; preflight keeps Preflight N/N passed.

Live: both actions render their own result; neither mentions preflight.

Tests: test/release-package.test.mjs.

Fixed in `b74ca23` (PR #43). The formatter branches on the payload: `validate_semver` → `Release Assistant: valid minor bump from 0.7.40-dsh.7 to 0.8.0.` (or the validation error); `preview_notes` → English/Russian/Chinese note blocks; `preflight` keeps `Preflight N/N passed.` Live: both actions render their own result; neither mentions preflight. Tests: `test/release-package.test.mjs`.
dsh closed this issue 2026-10-24 01:28:24 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
dsh-plugins/dsh-gitea#31
No description provided.