Skip to content
Source
Sign inSign up
pingdotgg/t3code

refactor: remove duplicate runtime logic and test scaffolding #9939

Closedmaria-rckswants to merge 3 commits intomain fromrefs/pull/9939/headopened View on GitHub

maria-rckscommented

Repeated activity parsers, orchestration event construction, SQL projections, IPC types, and test setup made equivalent behavior expensive to maintain. This cleanup removes 3,420 net lines across 51 files by sharing existing logic, deriving types from schemas, consolidating fixtures and table-driven cases, and deleting unused helpers while preserving platform-specific behavior.

Validation: 1,124 unique tests across 34 existing suites passed, along with nine affected workspace typechecks and changed-file formatting/lint (19 existing warnings). All 7,776 compared dev environment combinations matched; the upstream checkpoint conflict was resolved preserving its new interrupted-turn coverage, and all 35 reducer tests passed afterward. Real-app checks covered project-source labels, GitHub input, Git URL destination confirmation/cancel, and a draft thread in light/dark themes; native clients and live provider turns were not manually exercised.

Draft requested by Maria. Keep DO NOT MERGE. GitHub CI passed Check, Test, all three server shards, Rust, Release Smoke, and native fingerprint checks; the Effect Service Conventions bot remains queued. Two independent available-runtime reviewers found no correctness regressions on ab406dbee; the green-pr skill's required gpt-6-astra reviewers are unavailable, so formal readiness certification remains blocked. The sole SQL review finding was checked against both commits, disproved by the qualified query and 22 passing projection tests, and resolved.

project source options in dark mode

project source options in light mode

clone source selection, destination confirmation, and cancel

Model: gpt-5.6-sol. Harness: Codex.

    1. maria-rcks added labelsDO NOT MERGE

    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟠 High

      https://github.com/pingdotgg/t3code/blob/8c3cf868e993c7981c3dbcd1e01182e009765ffd/apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.ts#L1392

      listPinnedThreadActivityRowsByThread fails with SQLite's “ambiguous column name: activity_id” whenever pinned approval or user-input activities are present, so the thread detail read returns an error instead of the thread. The query joins pinned_activity_ids with projection_thread_activities, and interpolating unqualified activityColumns makes activity_id AS "activityId" ambiguous; qualify the selected columns with the activity alias (or use a qualified column fragment) in this query.

      ✅ Resolved in ab406dbee7b7aae9833fd4a6d68c649ed01e47a7

    4. maria-rcks changed the title

    5. maria-rckscommented

      Note

      Written by gpt-5.6-sol on behalf of Maria

      Checked both the referenced 8c3cf868e commit and current ab406dbee. This query retains explicit activity.activity_id, activity.thread_id, and the other qualified columns; it does not interpolate activityColumns. The shared unqualified fragment is used in single-table queries. Re-ran all 22 ProjectionSnapshotQuery tests on the current head, including pending approval and user-input activities outside the recent window; all pass. No code change needed.

    6. maria-rcks closed this

Sign in to join this conversation.