Repository navigation
Spec: TypeScript (bun build --compile) vertical-slice prototype and comparison against the Rust binary - #1843
Merged
Merged
Conversation
Add isolated TypeScript Ticket run prototype
Prototype: TypeScript Pickup and bounded BFS verification
A pull request from another repository can reuse the Issue branch name. Delivery treated that pull request as its own and could mark it ready. Ignore cross-repository pull requests, and bind the pull request just opened.
Preserve Pickup reservation and Claim handling while running dispatched Tickets through Delivery, Repair and failed-run salvage. Reconcile the prototype documentation and assertions for published work, and cover Pickup salvage and reservation lifetime.
Add shared-schema TypeScript Console, API and CLI slice
Preserve Delivery and bounded Repair documentation alongside the incoming shared-schema Console slice. Validated with scripts/affected-tests origin/issue-1831: typecheck and 54 Bun tests passed.
TypeScript prototype: Ticket Delivery and bounded CI Repair
Benchmark TypeScript prototype against Rust
JacobStephens2
marked this pull request as ready for review
November 7, 2026 01:27
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.
Summary
Implements the whole Spec across #1836–#1840 as an isolated Bun-compiled Linux
executable. Prototype-only edits select TypeScript checks; ordinary Rust edits
do not select the prototype. The production Rust executable and ADR-0001 stay
unchanged. The comparison records narrower prototype coverage and distinct
model graphs; it supports a Day shift decision rather than asserting rewrite
equivalence. Console state is separate from Ticket records, with one local
token and a single writer. Continuation, Spec runs and Self-merge remain outside
the implemented prototype slice.
Run, Claim, Delivery, CI and Pickup transitions use tagged states with explicit
exhaustiveness checks. Pickup applies the Claim before dispatch; its model
boundary explains the resulting difference from Rust's known pre-Claim
dispatch counterexample. The compiled executable embeds Factory skills and
Console assets while using Git,
ghand the representative Harness from PATH.The comparison report
retains cold/repeat timings, source inventories, binary sizes, model timings and
architectural tradeoffs. This review adds startup/status peak RSS samples:
25.16 MiB for TypeScript and 6.75 MiB for Rust, with explicit workload limits.
Closes #1831
Evidence
Execution evidence
PATH="$HOME/.bun/bin:$PATH" bun test --cwd prototypes/typescript tests/benchmark.test.ts -t 'benchmark CLI'failed the added RSS regression:
TypeError: undefined is not an object (evaluating 'report.runtimeMemory[language]');0 pass, 1 fail.After: the same command passed:
1 pass, 0 fail, 21 expect() calls.AssertionError: Spec #1831 requires memory footprint, but report contains no executable RSS/runtime-memory measurement.The same check passed after adding actual measurements for both standalone executables.
python3 prototypes/typescript/memory.py <binary> status --jsonafter each build. Linux child peak RSS is recorded in bytes with stdout,
stderr, command and exit status, using isolated HOME/XDG state. The report
preserves the original timing observations and separately identifies the
supplemental memory measurement's source commit and toolchain.
PATH="$PWD/.affected-tests/python-bin:$HOME/.bun/bin:$PATH" python3 -m unittest discover -s scripts -p 'test_*.py':Ran 37 tests in 16.255s,OK. The PATH selects Python 3.12; an initialattempt let a subprocess select Python 3.9 and failed on missing
tomllib.PATH="$HOME/.bun/bin:$PATH" bun test --cwd prototypes/typescript tests/console.test.ts:4 pass, 0 fail, 61 expect() calls, including compiled CLI/API/OpenAPI parity,authorization and desktop/mobile Playwright Dismissal, reload and Undo.
CARGO_BUILD_JOBS=4 cargo build --release --locked --bin thirdshift:passed in
5m 26s; this executable supplied the Rust RSS sample.PATH="$PWD/.affected-tests/python-bin:$HOME/.bun/bin:$PATH" CARGO_BUILD_JOBS=4 CARGO_PROFILE_DEV_DEBUG=0 CARGO_PROFILE_TEST_DEBUG=0 RUST_TEST_THREADS=3 scripts/affected-tests main:typecheck passed in 3.73s; all
56prototype tests passed (457assertions,99.24s). Local Cargo compilation used
four jobs, three test threads and disabled debug symbols to limit disk use.
cargo test, failed after1102.28s(compilation included). All
1,657unit tests passed (3ignored); integrationchecks passed through the earlier suites, then Console reported
235 passed, 1 failed, 1 ignored. The failure was the existingidle::unchanged_requests_reuse_retained_records_but_replacements_are_visible:unchanged request reread 156073 bytes(limit 48 KiB). Later integrationbinaries were not run after Cargo stopped.
PATH="$PWD/.affected-tests/python-bin:$HOME/.bun/bin:$PATH" CARGO_BUILD_JOBS=4 CARGO_PROFILE_DEV_DEBUG=0 CARGO_PROFILE_TEST_DEBUG=0 RUST_TEST_THREADS=3 cargo test --locked --test console idle::unchanged_requests_reuse_retained_records_but_replacements_are_visible -- --exact --nocapturefailed with
unchanged request reread 156041 bytes, matching the pre-reviewfailure already documented in
docs/research/typescript-vs-rust.md.git diff --exit-code main...HEAD -- src tests Cargo.toml Cargo.lock skillspassed with an empty diff. This is a pre-existing production validation limit;
no production change is included in this experiment.
Test seams: the benchmark CLI's structured results, execution and Worktree
cleanup with external compiler fixtures; the persisted empirical comparison;
the standalone executables'
status --jsonworkload. The existing Spec testsalso exercise temporary Git origins, fake GitHub/Harness processes, process-group
escalation, Delivery/Repair/salvage, reservation races and rendered Console flows.
Visual evidence
Implementation captures from #1844,
whose Console source/assets are unchanged by the Spec review. Before shows no
prototype Console listener; After shows seeded Inbox rows after Dismissal,
reload and Undo. This review reran the matching Playwright flow successfully.
Desktop · 1440×900
Mobile · 390×844
Review coverage
Independent Standards and Spec reviewers compared the whole Spec against
main(305923a8), including Ticket integration. Standards raised 0 findings;Spec raised 1 finding, the missing runtime-memory comparison, reproduced and
fixed in
1600a772with retained regression tests. Reports and each axis's final files-readlist are in
.thirdshift-review-YojVXH/standards.mdandspec.md;summary.jsonrecords
{"standards":0,"spec":1}before disposition.Both axes' final passes read all 38 changed files, including the added memory
probe and amended results. No changed file was left unread. No generated
output was excluded: the Bun lock and structured benchmark results were inspected.
Unaddressed findings
Standards
None.
Spec
None. The sole finding was reproduced and fixed.
Security
None. The introduced Console development-page disclosure was reproduced and fixed.
Security review outcome
No unaddressed introduced findings.
Merge Danger
Door: two-way
Revert the isolated prototype, comparison and selector changes to remove the
experiment. No production migration or ADR change is included.
Blast Radius: prototype
Prototype validation requires Bun, Chromium and Python 3. The executable uses
real Git/GitHub/Harness commands when invoked on a repository; its narrower
contracts and recovery limits are documented in its README. Ordinary Rust
behavior is unchanged.
Built with codex codex-cli 0.160.0 · gpt-6.1-sol · high
Tickets