Skip to content

Stabilize publication infrastructure: scope detection guard, Pages fallback, release dedup, metadata corrections#182

Merged
szmyty merged 2 commits into
mainfrom
copilot/publication-infrastructure-stabilization
Jun 3, 2026
Merged

Stabilize publication infrastructure: scope detection guard, Pages fallback, release dedup, metadata corrections#182
szmyty merged 2 commits into
mainfrom
copilot/publication-infrastructure-stabilization

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 2, 2026

Several compounding fragilities in the publication pipeline cause predictable failures under common conditions (force-push, docs-only commits, concurrent release triggers). This PR addresses the highest-impact issues identified in the publication system audit.

Workflow fixes

  • publication.yml — missing git cat-file guard (S1)
    detect-scope was calling git diff against BASE without verifying reachability. Added the same guard already present in pages.yml:

    if [[ -n "${BASE}" ]] && ! git cat-file -e "${BASE}^{commit}" 2>/dev/null; then
      echo "Base commit ${BASE} is unavailable in checkout history; falling back to full repository scan."
      BASE=""
    fi

    Eliminates fatal: bad object on force-push, rebase, and first-push scenarios.

  • pages.yml — hard-fail on missing fallback PDFs (M1)
    When a build is skipped, docs/reflector.pdf doesn't exist (it's transient, never committed). The sync and verify steps were unconditionally asserting its presence. Both steps now treat absent fallback PDFs as a warning — Pages serves the last deployed version instead of failing the deployment. PDFs are still required when the build actually ran.

  • release-paper.yml — release creation race condition (M2)
    Both publication.yml and release-paper.yml (triggered by tag push) could race to create the same GitHub Release. Added a pre-check that skips creation if the release already exists:

    if gh release view "${TAG}" >/dev/null 2>&1; then
      echo "Release ${TAG} already exists. Skipping."
      echo "skip=true" >> "$GITHUB_OUTPUT"
    fi

Metadata corrections

  • .zenodo.json"license": "mit""license": "apache-2.0" (correct SPDX identifier)
  • docs/index.html — hardcoded v0.0.1 updated to v0.1.1

Deliverables

Per issue requirements, three documentation artifacts generated:

  • audits/publication-infrastructure-audit-followup.md — resolution status for all 12 audit findings
  • audits/publication-artifact-inventory.json — artifact lifecycle with producer/consumer/ownership/persistence
  • docs/publication-workflow-map.md — canonical workflow reference: ownership, trigger conditions, deployment/release/sync flows, scope detection table, coupling points

Copilot AI linked an issue Jun 2, 2026 that may be closed by this pull request
77 tasks
…, release dedup, metadata fixes, deliverables

- S1: Add git cat-file reachability guard to publication.yml detect-scope,
  eliminating fatal: bad object failures on force-push/rebase/first push
- S2: Fix .zenodo.json license from 'mit' to 'apache-2.0' (correct SPDX id)
- S3: Fix docs/index.html hardcoded version from v0.0.1 to v0.1.1
- M1: Fix pages.yml synchronization and verification steps to gracefully
  handle missing docs/ PDFs when builds are skipped (warn + continue
  instead of hard fail)
- M2: Add release-exists pre-check to release-paper.yml to prevent race
  condition with publication.yml release job
- Generate audits/publication-infrastructure-audit-followup.md
- Generate audits/publication-artifact-inventory.json
- Generate docs/publication-workflow-map.md

Co-authored-by: szmyty <14865041+szmyty@users.noreply.github.com>
Copilot AI changed the title [WIP] Stabilize publication infrastructure and improve workflow reliability Stabilize publication infrastructure: scope detection guard, Pages fallback, release dedup, metadata corrections Jun 2, 2026
Copilot finished work on behalf of szmyty June 2, 2026 19:54
Copilot AI requested a review from szmyty June 2, 2026 19:54
@szmyty szmyty marked this pull request as ready for review June 3, 2026 00:36
@szmyty szmyty merged commit f512625 into main Jun 3, 2026
@szmyty szmyty deleted the copilot/publication-infrastructure-stabilization branch June 3, 2026 00:36
@devactivity-app
Copy link
Copy Markdown

Pull Request Summary by devActivity

Metrics

Cycle Time: 4h 52m Coding Time: < 1 min

Achievements

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.

Publication Infrastructure Stabilization

2 participants