Repository navigation
Fix attachment from pending T3 Code threads - #2
Merged
Merged
Conversation
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.
A T3 Code thread with a queued turn can have no provider turn ID. The history reader previously rejected the entire thread with
t3_history_unavailable, even when earlier completed conversation was available. It now selects the last completed turn at or before the captured head, reports that attachment boundary, and excludes unfinished turns.Subsequent pages include a replayable
next_argvwith--through-turn, so a running source cannot move the selected boundary between pages. Explicit missing boundaries fail closed. The skill now treats “continue here independently” as current-chat attachment and distinguishes T3 Code IDs from provider-native IDs in the README.Validation: all nine Python tests pass, including pending/running heads, pinned boundaries, missing/no-completed history, CLI pagination, and existing native/provider checks. The skill validator passes. Read-only checks against the two reported local threads recovered 119 and 17 public messages across 12 and 2 pages, with a consistent completed boundary throughout. No private history or thread IDs are included in this PR. Added Linux/macOS CI for Python 3.9 and 3.12. The suite also passes on the target MacBook's actual Python 3.9.6 runtime using a temporary checkout. Replaced
Path.stat(follow_symlinks=False)with equivalentPath.lstat()for compatibility with that runtime.Please review the completed-turn fallback and pagination boundary handling. Installation on the two user nodes is deferred until Greptile review and merge. This verifies the reader; a live Luna behavior evaluation has not been run.
The PR appears safe to merge, with no outstanding correctness, security, or repository-rule issues identified.
Summary
This PR allows T3 Code threads with pending, running, or interrupted heads to attach history through the latest completed turn. It also pins that boundary across paginated reads and clarifies current-chat attachment behavior.
--through-turn.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Resolve T3 thread] --> B[Capture current head row] B --> C[Select latest completed turn at or before head] C --> D[Return first history page] D --> E{More records?} E -->|Yes| F[Return next_argv with pinned --through-turn] F --> G[Read next page through same completed turn] G --> E E -->|No| H[Complete current-chat attachment]Reviews (2) · Last reviewed commit: "Pin CI actions to reviewed commit refere..."