Skip to content

Add isolated TypeScript Ticket run prototype - #1842

Merged
JacobStephens2 merged 4 commits into
issue-1831from
issue-1836
Nov 6, 2026
Merged

JacobStephens2 merged 4 commits into
issue-1831from
issue-1836

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

Issue URL
  Origin match + open issue + Trusted account
  Claim (ensure in-progress, replace ready-for-agent)
  Worktree + embedded Factory skill links + filtered issue file
  Claude streaming JSON session (null stdin)
    interruption: process group SIGINT → SIGTERM → SIGKILL
  Claim ending, including interruption and issue closure

Adds the isolated Linux TypeScript prototype under prototypes/typescript/ and its affected-test routing. Prototype-only changes select its typecheck and bun test; changes elsewhere never select the prototype suite. Mixed changes preserve existing routing and add prototype checks independently. Delivery and Pickup remain later tickets in #1831; production Rust behavior and ADR-0001 stay in place.

Closes #1836

Evidence

Execution evidence

  • Before: python3 -m unittest scripts.test_affected_tests.AffectedTests.test_typescript_only_runs_its_typecheck_and_tests failed: actual [['cargo', 'nextest', 'run']], expected prototype typecheck and tests.
    After: the same regression passes; the selector suite has 26 passing tests.
  • Before: bun test --cwd prototypes/typescript failed to build: Could not resolve: "../src/ticket.ts". The first successful-session regression then failed with ENOENT ... /session before session orchestration was implemented.
    After: bun run --cwd prototypes/typescript typecheck passes; bun test --cwd prototypes/typescript reports 14 pass, 0 fail, including compilation to an ELF x86-64 Linux executable (109,545,648 bytes) and execution with no Bun on PATH.
  • Review reproductions were run before deciding every behavioral finding. Duplicate exclusions failed with expected one exclusion, found 2; missing Claim label failed with exit 1 instead of 0; closure of an existing Claim failed with in-progress left behind. The same reproduction commands pass after the fixes, and their regressions remain in the CLI suite.
  • python3 -m unittest discover -s scripts -p 'test_*.py': 37 tests, OK with Python 3.12 on PATH for both the parent and nested commands. The host's default Python initially failed existing release-generator tests because it lacks tomllib.
  • scripts/affected-tests 16d018e0 (the prototype-only review-fix range): PASS, selecting only typecheck and bun test, with 14 tests passing and no Rust suite selected.
  • Repair validation at 51302871: cargo build --locked passes; python3 -m unittest discover -s scripts -p 'test_*.py' passes all 37 tests with Python 3.12; NEXTEST_TEST_THREADS=6 scripts/affected-tests issue-1831 passes TypeScript typechecking and all 16 CLI tests. The reported Copy fix command test passes in the full local Console run with lockfile dependencies installed. Broader failures are recorded in CI notes.

Test seams

  • Compiled CLI against temporary real Git repositories and fake GitHub CLI/Harness executables: pre-flight rejection, Claim labels, Worktree and skill contents/status, filtered comments, incremental JSON/UTF-8 output, failure results, and interruption of a signal-resistant process group including an exited leader.
  • scripts/affected-tests CLI against temporary real Git repositories and recorded runner executables: prototype-only, Rust-only and mixed selection.

CI notes

  • console-test failed the inherited Copy fix command works on ready Inbox rows and in Command details test at 1440:ready for review:green:conflicting Peek (0 !== 1); the earlier run failed its red/conflicting case, while the focused local invocation and the full local Console run pass this test. git diff --exit-code issue-1831 HEAD -- Cargo.toml Cargo.lock src skills console .github/workflows exits 0: the test, runtime inputs and CI check are unchanged.
  • Local npm test --prefix console, after npm ci --prefix console and installing pinned Chromium, reports 147 pass / 3 fail in 187.16s on Node 22.20.0: both JavaScript phone Dismiss cases time out at inbox.test.cjs:741, and Stop/requeue reads a null bounding box at stop.test.cjs:97; all three tests and their runtime inputs are unchanged under the same empty diff above.
  • Local NEXTEST_TEST_THREADS=6 scripts/affected-tests issue-1831 stops at unchanged idle::unchanged_requests_reuse_retained_records_but_replacements_are_visible: unchanged request reread 156181 bytes against a 48 KiB limit (355.42s; cached Rust compilation 0.63s), matching the earlier isolated failure of 156383 bytes. Rust inputs are unchanged under the empty diff above, and Rust CI passed on this exact head. No code was changed for these unrelated failures.

Review coverage

Independent thirdshift-code-review axes compared issue-1831...HEAD, then reviewed the new Claim module and final fix hunks. Standards: 2 findings, both addressed. Spec: 2 findings, both addressed. Each axis read all 15 changed files. No generated-output exclusions and no unread changed files.

Unaddressed findings

Standards

None. The duplicate-exclusion finding was reproduced and fixed; Claim policy was extracted into prototypes/typescript/src/claim.ts.

Spec

None. Both Claim findings were reproduced, fixed and covered by retained CLI tests.

Security

None. Two introduced findings were reproduced with local CLI regressions and fixed: a non-canonical Issue URL is rejected before any GitHub call, and writing .thirdshift-issue.md refuses to follow a symlink. Both regressions remain in prototypes/typescript/tests/ticket.test.ts. bun test --cwd prototypes/typescript reports 16 pass, 0 fail.

Security review outcome

No unaddressed introduced findings.

Merge Danger

Door: two-way

The prototype is isolated and removable. Its executable operates on the explicitly supplied repository and issue, retaining Worktrees for inspection.

Blast Radius: testing

The shared change is affected-test selection; routing regressions cover the new boundary and mixed changes. The production Rust executable is unchanged.

Built with codex codex-cli 0.160.0 · gpt-6.1-sol · high

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