Skip to content

feat: restore verified automatic updates - #116

Merged
mergify[bot] merged 3 commits into
mainfrom
codex/BEAR-111-verified-auto-update
Aug 3, 2026
Merged

feat: restore verified automatic updates#116
mergify[bot] merged 3 commits into
mainfrom
codex/BEAR-111-verified-auto-update

Conversation

@ericlitman

@ericlitman ericlitman commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

ThreadBear can again keep itself current without a LaunchAgent or a second scheduler. The consented hourly Luna helper reconciles archive work first, then delegates one deterministic, quiet update-last check to the CLI; Luna never chooses, downloads, or approves a release.

The updater accepts only the exact official Darwin asset for the published version, then verifies its repository URL, size bounds, SHA-256, embedded version, candidate self-test, confirmed install, and installed status. Equal-version drift can repair managed files, healthy installs remain quiet, newer local versions never downgrade, and every failure identifies its stage. A shared private operation lock serializes archive work, updates, and confirmed uninstall while preserving the durable pending-archive boundary.

The installed skill, setup recommendation, public site source, and maintainer policy now describe both archive and update behavior in friendly language. Shipped executable logic is 1,824 lines against the ratified 1,500 target and 2,000 absolute ceiling.

Fixes BEAR-111.

Policy authority

Policy-only PR #117 established BEAR-111's ratified 1,500-line target and 2,000-line absolute ceiling on main before this feature is merged. It measured the prior target baseline at 1,492 shipped lines, updated every enforcement surface together, passed Open SWE with no issues, and merged through Mergify at a72586a. This PR's current merge diff no longer changes its own size contract.

Validation

  • Exact merge head 65500b237cc0d83c71da3762840c6ca2e6588393: gofmt, normal tests, race tests, vet, both Darwin cross-builds, shell/parity checks, experiment validation, diff cleanliness, and the 1,824/2,000 shipped-logic gate pass.
  • Live official-service upgrade: the reviewed updater installed as 2.1.6 fetched the public v2.1.7 manifest and installed binary SHA-256 672b5a45e6af7096a338067955506c3bd9a3f9c5eb6232b73dba63489f8cbc84, exactly matching GitHub's checksum.
  • Live repair/no-downgrade: a missing managed skill returned repaired:true; the reviewed 2.1.8 candidate saw public v2.1.7, returned current:true, and preserved its exact binary hash.
  • Live archive gate: a deterministic candidate was staged pending, update returned stage:archive_pending, and guarded cancel restored archive_pending:false.
  • Live uninstall exclusion: confirmed uninstall remained blocked for 1.993 seconds with binary, skill, and state intact, then removed all three after lock release. A real update against the removed-directory window failed without recreating state.
  • Defect-first Review Agent found the operation-lock issues; the exact final pass against current main returned No findings. Fable inspected exact head 65500b2 and returned Ship using the runtime-tree byte identity and live evidence below.
  • No visual inspection or computer control was used.

Deployment boundary

threadbear.sh is deployed from the separate Cloudflare Pages threadbear-web repository. Its guide and installer lock files pin one immutable released product commit, so this source guide cannot reach fresh installers until the web lock cohort deliberately moves to a matching published release.

Residual risk: a future release-format or asset-naming change is not covered by the current live v2.1.7 service canary.

@mobilyze-open-swe-studio2 mobilyze-open-swe-studio2 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.

Open SWE Review found 3 potential issues.

Open in Web

Comment thread site/install
Comment thread .github/workflows/ci.yml
Comment thread cmd/threadbear/update.go
@ericlitman

Copy link
Copy Markdown
Owner Author

@Mergifyio queue

@mergify

mergify Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-08-03 21:34 UTC · Rule: default · triggered by @ericlitman with the @mergifyio queue command
  • Checks skipped · PR is already up-to-date
  • Merged2026-08-03 21:35 UTC · at 65500b237cc0d83c71da3762840c6ca2e6588393

This pull request spent 44 seconds in the queue, including 7 seconds running CI.

Required conditions to merge
  • github-review-approved [🛡 GitHub repository ruleset rule Mergify automatic merge queue]
  • all of [🛡 Merge Protections rule Queue ready pull requests]:
  • any of [🛡 GitHub branch protection]:
    • check-success = verify
    • check-neutral = verify
    • check-skipped = verify
  • any of [🛡 GitHub branch protection]:
    • check-success = Open SWE Review
    • check-neutral = Open SWE Review
    • check-skipped = Open SWE Review
  • any of [🛡 GitHub repository ruleset rule Mergify automatic merge queue]:
    • check-success = @mergify/Mergify Merge Protections
    • check-neutral = @mergify/Mergify Merge Protections
    • check-skipped = @mergify/Mergify Merge Protections

@mergify mergify Bot added the queued label Aug 3, 2026
@mergify
mergify Bot merged commit 8fc399c into main Aug 3, 2026
4 checks passed
@mergify mergify Bot removed the queued label Aug 3, 2026
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