Skip to content

Fix attachment from pending T3 Code threads - #2

Merged
krishhgg merged 3 commits into
mainfrom
fix/attach-pending-thread
Sep 21, 2026
Merged

krishhgg merged 3 commits into
mainfrom
fix/attach-pending-thread

Conversation

@krishhgg

@krishhgg krishhgg commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

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_argv with --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 equivalent Path.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.

RetriggerConfidence Score: 5/5

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.

  • Selects the latest completed T3 turn at or before the resolver-captured head.
  • Rejects missing explicit boundaries and threads without completed history.
  • Returns replayable pagination arguments containing the pinned --through-turn.
  • Adds tests across supported Python versions and operating systems.
  • Pins third-party CI actions to immutable commit SHAs.
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]
Loading

Reviews (2) · Last reviewed commit: "Pin CI actions to reviewed commit refere..."

Comment thread .github/workflows/tests.yml Outdated
@krishhgg
krishhgg merged commit d0f17db into main Sep 21, 2026
5 checks passed
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