Skip to content

[CTX-0504] chore(deps): break bitty-term-state<->bitty-ui dev cycle; verify bitty-app->bitty-perf edge - #833

Merged
Xuepoo merged 1 commit into
mainfrom
ctx-0504/chore-break-dev-cycle
Sep 16, 2026
Merged

Xuepoo merged 1 commit into
mainfrom
ctx-0504/chore-break-dev-cycle

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Priority: P1 | Area: tooling | Labels: chore,P1,area:tooling | Milestone: v0.1.0 | RFC: n/a | Task: CTX-0504

Closes #832

Summary

Restore ADR-0003 rule 1 ("The graph is a strict DAG. No cycles, including
dev-dependency cycles.") by moving the one View+State composition test from the
state core to the UI crate, and record the verified status of the
bitty-app -> bitty-perf edge.

Dev-dependency cycle broken

before after
bitty-term-state dev-dep bitty-ui (CTX-0058 exception) removed; test lives in bitty-ui
  • git mv crates/bitty-term-state/tests/resize_scrollback.rs crates/bitty-ui/tests/resize_scrollback.rs
  • cargo tree -p bitty-term-state -e dev after: proptest only
  • Cargo.lock diff: exactly one line ("bitty-ui" removed from the
    bitty-term-state dependency list); no packages added or removed
  • tests/compat/resize/README.md baseline path updated

bitty-app -> bitty-perf verified as a real production edge

  • crates/bitty-app/src/main.rs:198 declares mod dev; unconditionally.
  • crates/bitty-app/src/dev.rs:1159/:1216 call
    bitty_perf::startup::measure_headless_startup /
    bitty_perf::latency::measure_latency (plus PB1_*/PB4_* budgets) for the
    shipped bitty dev trace surface.
  • crates/bitty-app/tests/cli_dev.rs exercises that surface end-to-end.
  • Therefore it is not compose/tests-only. Removal requires relocating PB-1/PB-4
    measurement ownership into a crate bitty-app already depends on
    (bitty-runtime) or splitting the dev-trace CLI into its own binary — both
    architectural changes outside this chore. Recorded as residual.

Verification evidence

  • just check (fmt-check + clippy -D warnings + workspace tests + gates +
    actionlint + markdownlint): exit 0
  • cargo check --workspace --all-targets --locked: exit 0
  • cargo check --target x86_64-pc-windows-gnu --workspace --all-targets --locked: exit 0
  • cargo test -p bitty-ui --test resize_scrollback -- --list: 13 tests, names
    byte-identical to the pre-move set (TEST-SET-IDENTICAL)
  • act -n -W .github/workflows/ci.yml: all jobs succeeded

Residual

  • bitty-app -> bitty-perf: see verification above; needs a design decision on
    PB ownership or CLI surface before it can be removed.

Move crates/bitty-term-state/tests/resize_scrollback.rs to
crates/bitty-ui/tests/ and drop the test-only bitty-ui dev-dependency
(ses_fb7edd547 low #3 exception), restoring the strict DAG required by
ADR-0003 rule 1 ("No cycles, including dev-dependency cycles").

The 13 View+State composition tests keep identical names and coverage;
bitty-ui already depends on bitty-term-state and bitty-vt. Cargo.lock only
loses the bitty-term-state -> bitty-ui edge. The compat resize baseline
path is updated.

Verification: bitty-app -> bitty-perf is a real production edge, not
compose/tests-only. main.rs declares `mod dev` unconditionally and the
shipped `bitty dev trace` executors call bitty_perf::startup/latency
(dev.rs), covered end-to-end by tests/cli_dev.rs. Removing it requires
relocating PB-1/PB-4 measurement ownership into bitty-runtime or splitting
the CLI, so it is recorded as residual instead of changed silently.

Refs #832
@Xuepoo Xuepoo added this to the v0.1.0 milestone Sep 16, 2026
@Xuepoo Xuepoo added chore Chore / maintenance P1 Priority: high area:tooling Area: tooling labels Sep 16, 2026
@Xuepoo
Xuepoo merged commit b9bb10a into main Sep 16, 2026
10 checks passed
@Xuepoo
Xuepoo deleted the ctx-0504/chore-break-dev-cycle branch September 16, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tooling Area: tooling chore Chore / maintenance P1 Priority: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CTX-0504] chore(deps): break bitty-term-state<->bitty-ui dev cycle; verify bitty-app->bitty-perf edge

1 participant