Skip to content

Compose deterministic release notes with fail-closed publication checks #125

Closed

Description

@kiwidream

Summary

PR #116 makes resumed-draft notes deterministic, but its current publisher branch still has four fail-closed gaps across immutable publication, release lookup, remote asset inventory, and explicit note bytes.

Two root policies already have canonical open issues: #99 owns deterministic resumed notes and #100 owns release immutability. This draft is a branch-composition issue, not a replacement for either one. PR #117 independently fixes the immutability and non-404 lookup gaps, but PR #116 does not contain those fixes.

Current behavior at PR #116's head

  1. A newly published or already-published release is accepted when isImmutable is false or missing; the value is only printed.
  2. Any release_view failure—including authentication, permissions, rate limits, schema errors, or transport failures—is treated as “release not found.”
  3. A failed remote asset-list request can leave an empty manifest that passes subset validation because Bash disables errexit inside a function used in an || conditional context.
  4. An explicit --notes-file remains an external path. The draft body is verified, but the file can change before the final publish edit rereads it.

Expected behavior

One composed publisher branch should satisfy #99 and #100 while treating every inconclusive API/filesystem state as a hard failure. The exact notes and artifacts verified before publication must be the bytes locked into the release.

Acceptance criteria

  • Incorporate Fail release publication when GitHub release immutability is not enforced #100's strict isImmutable=true checks for both newly published and existing published releases, including false, missing, and delayed cases.
  • Treat only an explicit release-by-tag HTTP 404 as absence; abort on authentication, permission, API, schema, rate-limit, and transport failures.
  • Check every remote asset-list request explicitly before comparing manifests; never compare a truncated or empty file after a failed fetch.
  • Test persistent and transient asset API failures separately from temporarily missing digest values.
  • Snapshot an explicit notes file once into the private work directory, or bind it by digest, and use the same bytes for verification and publication.
  • Verify the final release body matches the expected notes bytes.
  • Retain Make resumed release-draft notes deterministic before publication #99's deterministic new/resumed-draft behavior and the prior fixed validation-preview/digest-retry regressions.
  • Add behavioral tests for all failure paths using the fake gh harness.
  • Require publication to leave the remote tag, release state, notes, and complete asset digest set mutually consistent.

Consensus impact

Consensus-adjacent. This is the release path binding signed source, validator-approved assets, release metadata, and immutable public state.

References

Activity

  1. added
    bug
    on Jul 13, 2026
  2. kiwidream commented on Sep 18, 2026

    @kiwidream
    MemberAuthor

    Re-audited at a2efbc19d6 (the publisher is identical on main and 1.x.x). Seven of the nine criteria are satisfied by the merged #116/#117 work: strict immutability checks, inconclusive release lookup aborting, notes snapshot plus byte-exact body verification, deterministic resumed drafts, and end-state consistency, all with fake-gh tests. Two remain open and are now the whole scope of this issue:

    1. write_remote_asset_manifest does not check the gh api exit status. When reached through wait_for_subset_assets || die in the resume-draft path, set -e is suspended, so a failed asset listing yields an empty manifest that passes the subset comparison and the run continues as if the draft had no assets. The exact-mode and validate-only calls happen to fail closed, but not by an explicit check.
    2. There is no test that fails the asset-list request (transiently or persistently) as distinct from a missing digest.

    Suggested fix: make write_remote_asset_manifest fail explicitly (|| return/die) and have wait_for_asset_manifest_match treat a fetch failure as a retryable error that never reaches the comparison; add the two harness tests. Keeping this open with the narrowed scope; the deterministic-notes and immutability parts are done.

  3. kiwidream commented on Sep 23, 2026

    @kiwidream
    MemberAuthor

    The two criteria left open by the 2026-09-18 re-audit are now met on 1.x.x by #170 (merge e58ea02871); the other seven were evidenced in that comment. Closing by hand because merges into a non-default branch do not fire closing keywords.

    • Every asset-list request is checked explicitly: write_remote_asset_manifest writes to a temporary file and moves it into place only when the whole paginated request succeeds, removing any previous manifest on failure, and all four call sites (draft resume, pre-upload, draft exact, post-publication exact) plus validation-only mode go through require_asset_manifest_match, which stops the run with an error naming the asset-list request before any create, upload, edit or publish.
    • Persistent and transient asset API failures are tested separately from missing digests: test_resume_aborts_when_asset_list_persistently_fails, test_resume_retries_transient_asset_list_failure, test_resume_does_not_compare_partial_paginated_asset_list, test_publish_final_verification_reports_persistent_asset_list_failure, test_validation_only_aborts_when_published_asset_list_fails, test_validation_only_aborts_when_draft_asset_list_fails (39 tests in ci/release/test_publish_local_release.py, the three digest-retry tests unchanged).

    Note for the release owner: the publisher is identical on main, so #170 must reach main before the next release is published from there. All three gates were green on the merge commit. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions