Repository navigation
fix(server): record historical thread creators with a narrow event and an offline provenance repair - #749
Merged
lastobelus merged 7 commits intoNov 19, 2026
Conversation
lastobelus
marked this pull request as ready for review
November 19, 2026 07:37
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
lastobelus
added a commit
that referenced
this pull request
Nov 19, 2026
The parent thread initiated this prerequisite fix for #749. ## Problem On the base branch, `vp run i18n:check` reports three missing desktop catalog keys and one stale key. ## What changed - Ran `vp run i18n:generate` to add the three missing keys. - Supplied translations for them in all nine non-English desktop locales. - Removed the obsolete key from every catalog. The desktop checker and runtime share the upstream-owned JSON catalogs. ## Verification - `vp run i18n:check` now passes. - Local Quick CI passes. - A smoke test of the desktop resolver passes in all nine non-English locales. ## Upstream provenance [T3 Code pingdotgg#37893](https://redirect.github.com/pingdotgg/t3code/pull/37893) at `055b44919ee`. Implemented with GPT-6.2 Sol in Codex. Claude Sonnet polished this description. Local review: 1 round with GPT-6.1 Terra (xhigh), approved. Carry-Source-Ref: refs/lastcode/carry-sources/pr-750/85f9c4012deb26ea72abcd4c5098b12395ead984 Carry-Source-Base: db8411e Carry-Source-Head: 85f9c40
Historical creator recovery could regroup threads and could only use evidence on the target environment. Accept a guarded manifest for scoped launch and schedule origins, and apply a provenance event without rewriting thread metadata or queuing work. Carry-Group: incubator Implemented with GPT-6.2 Sol in Codex.
Use the inspection config and full server ownership checks. Bind retries to the committed evidence, refuse conflicting local launch records and creator cycles, and keep repaired origin data isolated from forks and subagents. Carry-Group: incubator Implemented with GPT-6.2 Sol in Codex.
…hip locks Reject reused creation identities and compare pruned launch receipts against the scoped evidence. Bind retries to the applied precondition, validate scheduled edges before checking cycles, and hold both server locks for offline repair. Carry-Group: incubator Implemented with GPT-6.2 Sol in Codex.
Use creatorOrigin and ThreadCreatorOrigin for shared thread provenance. Keep the repair event and manifest origin kinds independent of that field name. Carry-Group: incubator Implemented with GPT-6.2 Sol in Codex.
Recognize atomic launch commands and recover recorded thread creation after pruning. Match webhook task identities exactly and remove rejected cycle edges before assessing other schedule repairs. Carry-Group: incubator Implemented with GPT-6.2 Sol in Codex.
Match creation and timeline records through the exact launch identifiers. Validate scheduled origins against the retained initial run, and apply the same cycle handling to both repair paths. Carry-Group: incubator Implemented with GPT-6.2 Sol in Codex.
Remove the prompted create_threads inference and fixtures that used a command shape the historical writer did not emit. Use the exact initial message for ordinary launches and the keyed creation record for create_threads. Carry-Group: incubator Implemented with GPT-6.2 Sol in Codex.
lastobelus
force-pushed
the
lastcode/fix-historical-thread-creator-repair
branch
from
November 19, 2026 08:18
efba61b to
b556800
Compare
Owner
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Closed
10 tasks done
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.
🐛 Problem
The earlier startup repair for historical MCP-launched threads had three flaws:
thread.metadata-updatedevent carrying the whole thread payload and had no check that the current row still matched the one it read.creatorGroupingto"grouped", which could move threads in the sidebar.🔧 What changed
thread.creator-repairedcarries only creator provenance. A local repair setscreatorThreadIdandcreatorOrigin. A scoped repair setscreatorOrigin(thread_launchorscheduled_task, with environment and thread IDs, plus the scheduled task ID for the latter).create_threadsby its keyed creation record. Other histories stay as recorded.onlyIfoption onEventSink.writeruns a check inside the event transaction. The write is skipped if the row changed since it was read.delegatedFromset, and threads that already have acreatorOrigin.getInteractiveThreadParentThreadId.repair-thread-creatorsis an unlisted offline command taking--manifest <file>and--apply. Use--base-dirand, where applicable,--state-dirto select the database.--apply. It acquires both server ownership locks in server order and checks the recorded process. Apply requires a stopped server. It then writes through the event sink.✅ Checks per manifest entry
expectedPayloadSha256.thread.createdevent binds the manifest to the target’s creation. Its payload hash must match, and contradictory retained local evidence blocks the write.thread_launch, the origin is a different environment, and the creation command ID equals the thread ID.scheduled_task, the origin is a different thread in this environment. The creation command must bind the task through a recognized timer, manual, or webhook fire ID. The creator thread needs a retained row, which may be a tombstone.An entry that fails any check reports a named status (for example
stale-targetormissing-creation-evidence) and writes nothing. Re-running an applied manifest reportsalready-repairedand writes nothing. If a thread has a different origin recorded, the entry reportsconflicting-origin.🧪 Testing
repairHistoricalThreadCreators.test.ts.Local review: 6 rounds with Astra (xhigh) and Fable (xhigh), not clean. Both approved the final cut. Additional test coverage for conflicting exact-message evidence and unpruned keyed creation records is deferred.
Implemented with GPT-6.2 Sol in Codex. PR writing pass by Claude Sonnet in Claude Code.