Skip to content

fix(release): recover artifacts from existing tags - #2779

Merged
Sinity merged 10 commits into
masterfrom
feature/fanout/distribution
Jul 12, 2026
Merged

Sinity merged 10 commits into
masterfrom
feature/fanout/distribution

Conversation

@Sinity

@Sinity Sinity commented Jul 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

Completes the release-artifact recovery path for v0.2.0, makes every documented install channel exercise its production packaging route, and attaches verifiable browser-store submission metadata.

Problem

v0.2.0 has a real GitHub tag/release but no release assets, no release/Homebrew tag workflow run, and no PyPI project. Rebuilding from current master could have published newer source under an older release version. The documented pipx and Homebrew install paths had not been exercised by their release workflows, and store archives were not bound to a full source revision.

Solution

  • Release, container, and extension workflows accept release_tag, resolve refs/tags/vX.Y.Z, and reject a checkout whose commit differs from the tag target. Manual PyPI publication requires it.
  • PyPI release CI builds and installs the wheel through pipx, smokes CLI/daemon/MCP entrypoints, and requires installed VERSION_INFO to contain the full 40-character checked-out revision.
  • GHCR builds embed the full checkout revision, publish it as an OCI label, then pull slim and distroless images and assert the concise CLI prefix plus the exact machine-readable VERSION_INFO.commit. Recovery never rewrites latest.
  • Homebrew now audits, installs, and runs brew test on the generated resource-expanded formula before opening its tap PR.
  • Extension releases attach a source-revision-and-SHA-256 store-submission manifest alongside exactly one version-matched Chrome archive, Firefox archive, and screenshot bundle. The installation matrix documents every route and the no-recut recovery sequence.

Acceptance matrix

Bead Status Evidence
polylogue-y8s5 implementation support satisfied; external publication deferred Release, pipx, GHCR, Homebrew, and extension lanes now have recovery/publish/smoke wiring. The documented v0.2.0 dispatches still require operator-owned PyPI Trusted Publishing and Homebrew credentials.
polylogue-6rvt satisfied/extended PR #2743 supplied full revision for Nix. This PR proves it from the installed wheel and embeds/smokes the same full revision in GHCR runtimes.

Verification

  • nix develop --command devtools release verify-distribution --work-dir /realm/tmp/polylogue-distribution-pipx — built wheel + sdist, installed each in isolated venvs, and exercised CLI, daemon, MCP, parser, and diagnostics entrypoints.
  • pipx install --suffix=-smoke /realm/tmp/polylogue-distribution-pipx/dist/polylogue-0.2.0-py3-none-any.whl — installed the built wheel through real pipx; polylogue-smoke, polylogued-smoke, and polylogue-mcp-smoke all passed.
  • node browser-extension/scripts/build.mjs --out /realm/tmp/polylogue-adversarial-store --no-source-sync — emitted one Chrome and one Firefox v0.2.0 archive; manifest checks verified version-matched names, a 40-character source revision, SHA-256, and sizes.
  • nix develop --command devtools verify ci-workflows — verify ci-workflows: 17 workflow files checked, no errors.
  • nix shell nixpkgs#actionlint -c actionlint on the changed workflows — exit 0.
  • Pre-push devtools verify --quick — exit 0 after each commit.

The focused extension build suite has one reproducible unrelated failure: its pre-existing packaged-service-worker fixture expects two page requests and receives one. It does not cover any changed workflow/docs/package-metadata path; its archive-emission tests pass.

No tests were added. The release verifier exercises the production Hatch build configuration and installed console entrypoints; removing a runtime dependency or entrypoint would fail the isolated-wheel smoke. The pipx smoke exercises the documented installer rather than a test wrapper. The Homebrew smoke executes the formula test shipped to users. The extension build uses the production archive builder, and the submission-manifest validation would fail if a required archive or its integrity metadata were removed.

Problem: v0.2.0 has a release tag but its PyPI, GHCR, Homebrew, and extension artifact lanes did not run. Rebuilding from master would misrepresent the tagged source and container images did not carry a verifiable full revision.\n\nWhat changed: manual artifact recovery now checks out and validates a named vX.Y.Z tag before publishing. GHCR builds receive and smoke-check the complete source revision. The extension package and install matrix now describe matching release artifacts, pipx, and the recovery sequence.\n\nCompatibility/migration: normal tag pushes retain their existing paths; manual publication now requires an explicit release_tag.\n\nRef polylogue-y8s5\nRef polylogue-6rvt\n\nCo-Authored-By: Claude <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 12, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@Sinity, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: d59aca49-3576-4101-87ed-c5522b3ab4f2

📥 Commits

Reviewing files that changed from the base of the PR and between 901825e and 872f831.

📒 Files selected for processing (6)
  • .github/workflows/container.yml
  • .github/workflows/extension-release.yml
  • .github/workflows/homebrew-bump.yml
  • .github/workflows/release.yml
  • docs/installation.md
  • docs/release.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fanout/distribution

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 288f0ca836

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/container.yml Resolved
Sinity added 4 commits July 12, 2026 23:23
Problem: the release workflow only installed wheels with pip, leaving the documented pipx route unproved. It also did not assert that the packaged wheel exposes its full immutable revision.\n\nWhat changed: install the built wheel with pipx and exercise the CLI, daemon, and MCP scripts against an isolated archive. The release build now reads VERSION_INFO from the installed wheel and requires the complete checked-out revision.\n\nRef polylogue-y8s5\nRef polylogue-6rvt\n\nCo-Authored-By: Claude <[email protected]>
Problem: the tap workflow audited a generated formula but could open a PR without building it or exercising its Formula test block.\n\nWhat changed: install the resource-expanded candidate from source and run brew test before tap publication.\n\nRef polylogue-y8s5\n\nCo-Authored-By: Claude <[email protected]>
Problem: release assets identified the extension version but did not give store operators a machine-readable binding from each archive to its exact source revision and bytes.\n\nWhat changed: emit and attach a versioned store-submission manifest with the source revision, Firefox ID, archive SHA-256 values, and sizes. Document it in the install matrix.\n\nRef polylogue-y8s5\n\nCo-Authored-By: Claude <[email protected]>
Problem: recovery could move latest backwards, accept an ambiguous ref, and assert a full revision in the intentionally concise version string. Store attestation also accepted two artifacts of the same kind.\n\nWhat changed: recovery resolves explicit tag refs and verifies their target commits. It leaves latest untouched during manual recovery, smokes the concise version prefix plus the full machine-readable runtime revision, and requires one version-matched Chrome archive and one Firefox archive. Source extension manifests remain consistent until the release builder synchronizes both.\n\nRef polylogue-y8s5\nRef polylogue-6rvt\n\nCo-Authored-By: Claude <[email protected]>
@Sinity

Sinity commented Jul 12, 2026

Copy link
Copy Markdown
Owner Author

Adversarial review — iteration 1

Findings and fixes:

  • Real: GHCR smoke expected the intentionally concise polylogue --version output to contain all 40 revision characters. Fixed in 56e2c4873: retain the short CLI-prefix smoke and compare the full VERSION_INFO.commit field exactly.
  • Real: manual recovery could repoint latest to an older tag. Fixed: only normal tag-push release flow emits latest; recovery publishes versioned tags only.
  • Real: recovery accepted an ambiguous ref and did not prove HEAD matched the tag. Fixed: checkout now uses refs/tags/<tag> and verifies the resolved tag commit in release, container, and extension workflows.
  • Real: extension attestation accepted two archives without requiring one Chrome and one Firefox artifact. Fixed: require exactly one of each, exact versioned names, and a full lowercase-hex source revision.
  • Real: this PR had made only package.json version 0.2.0 while committed manifest.json remained 0.1.0. Fixed by restoring the package source version; the production builder synchronizes both source manifests from pyproject.toml before packaging.

What survived scrutiny: the pipx release route, Homebrew formula smoke ordering, installed-wheel full-revision proof, and store archive creation.

Verification: workflow checks and actionlint passed; production store-manifest build passed. The focused extension suite has one reproducible, unrelated pre-existing packaged-service-worker fixture failure (expected two backfill page requests, received one); archive-emission coverage passed.

Proceeding to an independent iteration 2.

Sinity added 2 commits July 13, 2026 00:52
Problem: recovery documentation still claimed that the concise CLI version rendered the full tag revision.\n\nWhat changed: document the concise CLI prefix separately from the full machine-readable VERSION_INFO.commit field used for runtime attestation.\n\nRef polylogue-6rvt\n\nCo-Authored-By: Claude <[email protected]>
Problem: checking out a tag and comparing HEAD to that same tag does not detect a retargeted release tag. Recovery documentation also linked to a missing section and still advised re-cutting after Trusted Publishing setup failures.\n\nWhat changed: explicit recovery now compares each tag to the immutable commit recorded on its GitHub Release. The release checklist owns the backfill sequence and forbids moving the existing tag.\n\nRef polylogue-y8s5\nRef polylogue-6rvt\n\nCo-Authored-By: Claude <[email protected]>
@Sinity

Sinity commented Jul 12, 2026

Copy link
Copy Markdown
Owner Author

Adversarial review — iteration 2

Findings and fixes:

  • Real: the recovery link in installation docs targeted a nonexistent release-checklist anchor, while the release checklist still instructed operators to re-cut a tag after Trusted Publishing setup failure. Fixed in 58fe7f1b1: the release checklist now owns a real no-recut recovery section and directs the operator to configure the publisher then replay the existing tag.
  • Real: recovery compared HEAD only to the same mutable tag ref it had just checked out. Fixed: explicit recovery now fetches the GitHub Release target, requires a full 40-character SHA, and requires tag target plus checked-out commit to equal it.

What survived scrutiny: the tag-ref disambiguation, non-latest recovery policy, concise/full revision split, pipx wheel route, Homebrew install/test ordering, and one-Chrome/one-Firefox store manifest contract.

Verification: actual v0.2.0 tag SHA equals its GitHub Release target; a simulated mismatched release target rejected; workflow/actionlint/document-command checks passed.

Proceeding to an independent iteration 3.

Problem: docker/metadata-action auto-generates latest from active semver tags, so manual recovery could still retarget latest despite the explicit rule being disabled.\n\nWhat changed: disable automatic latest generation and assert the recovery metadata has no latest tag before any image can be pushed.\n\nRef polylogue-y8s5\n\nCo-Authored-By: Claude <[email protected]>
@Sinity

Sinity commented Jul 12, 2026

Copy link
Copy Markdown
Owner Author

Adversarial review — iteration 3

Finding and fix:

  • Real: docker/metadata-action automatically creates latest from active semver tags unless its flavor disables that behavior. Manual recovery therefore still risked retargeting latest. Fixed in a029bde60: set latest=false and assert the real recovery metadata output contains no slim or distroless latest tag before a build/push step.

What survived scrutiny: release-target commit binding, explicit tag checkout, concise/full revision contract, pipx smoke, Homebrew formula smoke, extension artifact cardinality and attestation.

Verification: workflow checker and actionlint passed; the recovery-latest contract is present and fails before publication if metadata contains latest.

Proceeding to an independent iteration 4.

Sinity added 2 commits July 13, 2026 01:13
Problem: the post-publish smoke constructed an image reference from the\ncapitalized GitHub owner, while direct Docker repository paths require\nlowercase components.\n\nWhat changed: use the canonical sinity/polylogue repository name for\nmetadata and smoke pulls.\n\nRef polylogue-y8s5\nRef polylogue-6rvt
Problem: a manually supplied version could rebuild the tap from an\narbitrary PyPI release and overwrite a newer formula.\n\nWhat changed: recovery accepts an immutable release tag, validates it against\nthe GitHub Release target, checks out that tag, and rejects formula\ndowngrades. The recovery documentation now uses the same input.\n\nRef polylogue-y8s5
@Sinity

Sinity commented Jul 12, 2026

Copy link
Copy Markdown
Owner Author

Adversarial review — iteration 4

Findings and fixes:

  • Real: the GHCR smoke derived its direct Docker reference from mixed-case github.repository_owner (Sinity), even though Docker repository components must be lowercase. This would have made the post-push slim/distroless smoke fail despite a successful publication. Fixed in 5fb618634: metadata generation and smoke pulls now share the canonical ghcr.io/sinity/polylogue name.
  • Real: Homebrew recovery accepted a free-form version, checked out default-branch template code, and could force-update the tap formula to an older published release. Fixed in 872f8318b: recovery now requires release_tag, checks out that tag, validates the tag against the GitHub Release's recorded full SHA, and refuses a formula downgrade. The recovery command/documentation use the same input.

What survived scrutiny: the no-latest GHCR recovery guard, full packaged revision assertions, pipx wheel route, extension artifact attestation, and generated-formula install/test ordering.

Verification: nix develop --command devtools verify ci-workflows reported 17 workflow files checked, no errors; nix shell nixpkgs#actionlint -c actionlint .github/workflows/container.yml .github/workflows/homebrew-bump.yml exited 0; the pre-push devtools verify --quick gate passed before both commits.

Proceeding to an independent iteration 5.

@Sinity

Sinity commented Jul 12, 2026

Copy link
Copy Markdown
Owner Author

Adversarial review — iteration 5 (converged)

No legitimate gaps found across all 2 beads after iteration 5 review. This cold review rechecked the full origin/master...HEAD diff, both bead bodies/notes, the PR body/comments, release-dispatch identity binding, pipx/wheel and full-revision contracts, GHCR metadata/smoke references, Homebrew recovery/downgrade handling, extension attestations, and install documentation.

Final acceptance matrix

Bead / AC Status Honest evidence / remaining condition
polylogue-y8s5: a real tagged release exists satisfied v0.2.0 already exists as a GitHub release/tag; this PR deliberately provides no re-cut path.
polylogue-y8s5: PyPI, Homebrew, and GHCR tagged artifacts are published and smoke-tested at least once deferred — external release action This PR supplies the guarded recovery/publish/smoke routes: built-wheel + pipx, generated-formula install/test, and published slim/distroless runtime checks. Actual artifacts still require the operator-owned PyPI Trusted Publishing setup, Homebrew tap token/PR merge, GHCR dispatch, and a real workflow run. Known Actions billing init failures have no job steps and are classified as infrastructure.
polylogue-6rvt: full immutable revision in Nix packaged runtime, concise human output + machine-readable daemon identity, dirty/source behavior, package proof, and deployment documentation satisfied in merged PR #2743 The bead notes record the merged Nix/metrics/docs/package-level implementation and verification. This PR does not replace it.
polylogue-6rvt: wheel/GHCR packaging parity extended here; actual GHCR smoke deferred with y8s5 publication Installed wheel CI compares VERSION_INFO.commit to the exact 40-character checkout revision; GHCR builds embed that revision and the release smoke checks it from both images. The latter awaits an actual guarded GHCR recovery dispatch.

No beads were closed or updated, per lane instruction. The reproducible extension packaged-service-worker fixture failure remains unrelated to these workflow/docs paths; all GitHub Actions failures that stop at billing initialization remain excluded from product verification.

@Sinity
Sinity merged commit 83d0950 into master Jul 12, 2026
4 of 18 checks passed
@Sinity
Sinity deleted the feature/fanout/distribution branch July 12, 2026 23:27
Sinity added a commit that referenced this pull request Jul 12, 2026
…803,2787,2798

013x (search-coverage, PR #2803) and g9f2 (write-model, PR #2798) fully
satisfied — closed. y8s5 (distribution, PR #2779), ttu (docs-ia, PR #2778),
kwsb (PR #2799), and n4hb/c52g/znwj (test-hardening, PR #2787) partially
satisfied — noted with disposition, left open per closure-discipline.

Co-Authored-By: Claude <[email protected]>
@Sinity

Sinity commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

  • 51.F077 / P2: Fix and current-source recheck assigned to polylogue-dktc4; not claimed fixed. Manual recovery still has a second route: an empty release_tag explicitly uses the selected workflow ref (.github/workflows/container.yml:34,69). On a selected older v-tag, the raw latest rule remains enabled at line 158 while the recovery guard at line 162 is skipped because release_tag is empty; push=true remains admitted by the manual dispatch branch.

Only the rows listed above are dispositioned. Held findings remain open.

Sinity added a commit that referenced this pull request Oct 19, 2026
…from stored bytes (#6304)

Polylogue's `primary` mode on Sinex (architecture 7.1; epic plnext-3sx),
and the rebuild proof (joint #7).

**The loop builds the index from stored bytes.** A deleted or outdated
`index.db` is built again by the same loop from what `archive.db`
stored, read by range through `hashed-blobs`, even when the provider
file moved or went. This is also what lets a standalone archive rebuild
without its files. Two engine tests cover it.

**`crates/sinex` (`polylogue-sinex`, behind the `sinex` feature; the
default build has no NATS dependency):**
- Publish: every input blob is placed into Sinex's content store (same
host) and registered as a material; every unit of `archive.db` rows (a
revision with its input, extents, observations and blob rows; a note
with targets and relations; an excision; a setting; a delivery) travels
as a record-batch material plus one `polylogue.rows` event
(Sinity/sinex#2779). Frames are named by what they carry, units by their
position in write order, so the publish step asks Sinex (`have`, by
bisection) and sends only the rest; nothing local records what was sent.
- Restore: an empty archive reads its units from the confirmed stream in
order, checks each batch whole and contiguous positions, inserts the
rows, and takes over the archive's identity and write counter. The loop
then builds `index.db` with Sinex's store as an extra blob root.
- Daemon: `$XDG_CONFIG_HOME/polylogue/sinex.toml` with `mode =
"primary"` adds Sinex's store as a blob root, restores an empty archive
named by `archive = "<id>"`, and publishes once a minute. A file that
does not parse pauses publishing and never switches mode.
- The row codec lives in `polylogue-store::rows` (only the store opens
SQLite); `archive.db` now carries an `archive_id`.

**Proof** (`crates/sinex/tests/proof.rs`, ignored by default; how to run
it is in `docs/development.md`): the Claude Code examples converge
standalone, publish to a real `sinexd` over a throwaway PostgreSQL and
NATS (a second publish sends nothing), restore into an empty archive,
converge with no provider files present, and every session and message
comes back identical. Passed (18 s).

Verification: `xtask fast`; nextest on store, engine and sinex (56
passed); the proof run against `sinexd` built from Sinex #2779.

Not done (follow-ups filed): normalized segments and object-level
equivalence keys (joint #3–#5); excision orders across the boundary
(joint #6, #19); the pending area that drops local copies once Sinex
confirms; tables without `local_seq` (`kept_result`, `variant`,
`variant_alignment`, `notice_delivery`) and `delivery_event`s added
after their delivery's publish; publishing from another host (bytes over
NATS); the real-corpus rebuild before any cutover.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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