Restore native automatic archiving [BEAR-110] - #115
Merged
Conversation
Contributor
Merge Queue Status
This pull request spent 40 seconds in the queue, including 8 seconds running CI. Required conditions to merge
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This preserves the useful safety invariants from BEAR-10 / PR #9 (
77c640b,91cf3a4) without reviving its LaunchAgent, App Server writer, classifier, or cycle machinery.Release note
ThreadBear can once again tuck completed tasks into the archive after 14 quiet days and bring ThreadBear-owned archives back through native Codex controls.
Review
Shipafter adding update-last ordering and an honest line-budget plan for BEAR-11146400e24: fixed nullable native-row scanning and post-mutation archive drift adoptionShipLive native proof
Revised candidate
900ba5756ae9aef1953fdeeb5c70376676dd496e7030f2287c0f7f7789e4656aexercised real local Codex tasks through supported native controls.migration_pendingrejected maintenance.set_thread_archived(..., archived:true)returned the exact task ID; reconciliation committed ThreadBear ownership and native SQLite readback wasarchived=1.set_thread_archived(..., archived:false)returned the exact task ID; reconciliation removed ownership, cleared pending state, and recorded a fresh quiet clock.archived=0, and the task retained its unchanged managed title.2026-08-01T18:50:49.74719542Z, then received a real background user turn before the stale native archive call.No task was opened or selected, and no visual inspection or computer use was involved.
Test plan
go test ./...go test -race ./...go vet ./...sh -n install.shcmp install.sh site/install.shcmp INSTALL.md site/installpython3 scripts/validate-experiments.pygit diff --checkgo test ./cmd/threadbear -run TestShippedLogicStaysBelowAbsoluteLineCeiling -vLinear: BEAR-110