Skip to content

[CTX-1412] chore(architecture): retire unwired bitty-rich surfaces (#2117) - #2357

Merged
Xuepoo merged 2 commits into
mainfrom
ctx-1412/chore-retire-rich-unwired
Oct 21, 2026
Merged

Xuepoo merged 2 commits into
mainfrom
ctx-1412/chore-retire-rich-unwired

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Priority: P2 | Area: architecture | Labels: chore,P2,area:architecture | Milestone: 0.0.25 | Umbrella: #2117 | Task: CTX-1412

Retire the two unwired rich-presentation surfaces from Core under umbrella #2117. Neither has a consumer in any runtime, renderer, plugin, or test path; the change is dead-surface removal, not a seam move.

What changed

  • Delete crates/bitty-rich/src/presentation.rs — the RichPresentation snapshot aggregation view; only its own tests referenced it.
  • Delete crates/bitty-rich/src/projection.rs — the fragment-to-RichBlock projection. This was the sole consumer of the bitty-ipc edge in bitty-rich, so the crate now links no extracted extension repository in production (ADR 0015 partitions IPC out of Core). Cargo.lock drops the extra bitty-ipc rev 9493674 edge.
  • Guard: new crates/bitty-rich/tests/retired_surface_guard.rs rejects the retired module files, module declarations, and exported identifiers (RichPresentation, ProjectedBlock, ProjectionError, project_fragments) across every crates/*/src tree, and rejects a revived bitty-ipc dependency in crates/bitty-rich/Cargo.toml. A parser unit test pins the manifest classifier (plain, renamed, table, target, commented-out forms).
  • W-147 fence: SEAM_CRATES narrows the bitty-ipc allowlist from {bitty-rich, bitty-runtime, bitty-terminal} to {bitty-runtime, bitty-terminal}. No other fence entry changes.
  • Docs: crate README records the retired surfaces and the unchanged [core-split] Retire bitty-rich graphics/scene remainder onto extension seam #2163 scope; bitty-terminal-docs interfaces/rich-content.md gets the matching current-model-boundary update (separate docs PR: bitty-terminal-docs#266).

Review fixes (head 7a9bffb8)

  • Guard rationale reworded: the crate is not an extraction target for the scene/image/place/background surface. W-133 / ADR 0016 Boundary 2 keeps the graphics trust decision and scene composition in Core; this PR only removes two unwired helpers.
  • crates/bitty-rich/README.md reconciled with the [core-split] Retire bitty-rich graphics/scene remainder onto extension seam #2163 retention decision ([CTX-1343] chore(graphics): fence the bitty-rich graphics seam (#2163) #2360): the retention paragraph and the retirement note now sit together and agree; #2360 rebases its table on top of this merge (its docs fixes are handled separately).
  • scene::tests::scn3_text_bytes_per_block_enforced now pins SCENE_MAX_TEXT_BYTES_PER_BLOCK == 256 * 1024 numerically, restoring the value assertion the retired projection helper used to exercise.

Re-ran: cargo fmt --all -- --check, cargo clippy -p bitty-rich --all-targets --locked -- -D warnings, and cargo nextest run -p bitty-rich --locked (417/417).

Deliberately not in scope

  • scene.rs / image.rs / kitty_place.rs / background.rs remain — bitty#2163 owns them and is blocked on the bitty-graphics#15 seam contract.
  • The legacy kitty placeholder stub (kitty.rs) and wallpaper_theme.rs are now fully unconsumed (the stub keeps only two bound constants); retiring them needs a bound-migration decision and is filed as a scoped follow-up rather than bundled here.
  • kitty_decode.rs / kitty_raster.rs copies stay until the graphics composition-root wiring lands.

Follow-ups filed from this triage: #2358 (legacy kitty stub), #2359 (wallpaper_theme retire-or-wire).

Compatibility note

bitty-rich is publish = true, so this removes public API. The workspace is 0.0.x pre-stable and the same pre-1.0 removal precedent applies as in #2354 (resolver retirement); removal is compile-visible, never a silent behavior change.

Verification (target dir .targets/ctx-2117)

  • cargo check -p bitty-rich --all-targets and cargo check --workspace --all-targets --locked: pass.
  • cargo clippy -p bitty-rich --all-targets --locked -- -D warnings: pass.
  • cargo fmt --all -- --check: pass.
  • cargo nextest run -p bitty-rich --locked: 417 tests, all pass (guard included).
  • cargo test -p bitty-terminal --test verify_w147_small_core_graph --locked: 15/15 pass.
  • cargo test -p bitty-runtime --test ctx1087_architecture_parity --locked: 4/4 pass.
  • just scratch-paths: OK.
  • just markdownlint: one pre-existing failure at CHANGELOG.md:64 (MD024 duplicate "Changed"), unchanged by this PR and already failing at origin/main f246dc55; no changed file is an offender.
  • No just ci-local / act run (per task instruction); remote CI is the gate.

Mutation proof: restoring crates/bitty-rich/src/presentation.rs with RichPresentation fails retired_module_files_stay_absent and core_sources_never_name_retired_symbols; planting project_fragments in crates/bitty-ui/src/ fails the source scan; removing the probes passes.

Refs #2117

@Xuepoo Xuepoo added this to the 0.0.25 milestone Oct 21, 2026
@Xuepoo Xuepoo added chore Chore / maintenance P2 Priority: medium area:architecture labels Oct 21, 2026
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 56 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0e78afe5-e9c4-481a-a381-34a75bc07f33
📥 Commits

Reviewing files that changed from the base of the PR and between f246dc5 and 7a9bffb.

⛔ Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing: 8
  • crates/bitty-rich/Cargo.toml
  • crates/bitty-rich/README.md
  • crates/bitty-rich/src/lib.rs
  • crates/bitty-rich/src/presentation.rs
  • crates/bitty-rich/src/projection.rs
  • crates/bitty-rich/src/scene.rs
  • crates/bitty-rich/tests/retired_surface_guard.rs
  • crates/bitty-terminal/tests/verify_w147_small_core_graph.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…2117)

Retire the two rich-presentation surfaces no Core path consumed:

- `crates/bitty-rich/src/presentation.rs` - the `RichPresentation`
  snapshot aggregation view (hyperlinks + shell zones + clipboard +
  command blocks + legacy Kitty placeholder stub); it was referenced only
  by its own tests.
- `crates/bitty-rich/src/projection.rs` - the fragment-to-`RichBlock`
  projection. It was the only consumer of the `bitty-ipc` edge inside
  `bitty-rich`, so this also removes a production dependency from a Core
  crate on an extracted extension repository (ADR 0015 partitions IPC
  out of Core) and drops the extra `9493674` IPC revision from
  `Cargo.lock`.

No behavior change: neither module is reachable from any runtime,
renderer, plugin, or test path; scene/image/place/background stay
untouched (#2163 scope), as do the legacy `kitty` stub and
`wallpaper_theme` (separate follow-ups).

Guards:
- new `crates/bitty-rich/tests/retired_surface_guard.rs` rejects the
  retired module files, module declarations, and exported identifiers in
  every `crates/*/src` tree, and rejects a revived `bitty-ipc`
  dependency in the crate manifest.
- W-147 `SEAM_CRATES` narrows the `bitty-ipc` allowlist to
  `bitty-runtime`/`bitty-terminal`; the fence is green 15/15.

Mutation proof (recorded in the PR): restoring
`crates/bitty-rich/src/presentation.rs` fails
`retired_module_files_stay_absent` and
`core_sources_never_name_retired_symbols`; planting `project_fragments`
in `crates/bitty-ui/src/` fails the source scan; removing the changes
passes again.

Refs #2117
@Xuepoo
Xuepoo force-pushed the ctx-1412/chore-retire-rich-unwired branch from 9a30a88 to 3566590 Compare October 21, 2026 03:37
…CN-3

Apply the three review fixes for #2357 without changing the retirement:

- Guard rationale: stop framing the crate as "#2163 shrinks it". The
  accepted graphics contract (W-133 / ADR 0016 Boundary 2) keeps the trust
  decision and scene composition in Core; the crate's scene/image/place/
  background modules are Core-retained implementation. Only the two
  *unwired helpers* are retired, which is not a boundary change.
- README: add the retention paragraph beside the retirement note so the
  file agrees with the #2163 retention decision (#2360), and scope the
  retirement to the helpers.
- `scene::tests::scn3_text_bytes_per_block_enforced`: pin
  `SCENE_MAX_TEXT_BYTES_PER_BLOCK == 256 * 1024` numerically, restoring the
  value assertion the retired projection helper used to exercise.

Refs #2117
@Xuepoo
Xuepoo merged commit 4c46884 into main Oct 21, 2026
18 checks passed
@Xuepoo
Xuepoo deleted the ctx-1412/chore-retire-rich-unwired branch October 21, 2026 04:27
Xuepoo added a commit that referenced this pull request Oct 21, 2026
…paper_theme (#2358, #2359) (#2365)

* [CTX-1415] chore(architecture): retire bitty-rich kitty placeholder stub (#2358)

The streaming Kitty placeholder stub had no consumer after #2357 removed
its last caller. Real bounded APC G intake lives in bitty-vt/src/kitty_apc.rs
and decode/placement policy in bitty-rich/src/kitty_place.rs.

Move the two surviving bounds into kitty_place.rs with values unchanged:
- KITTY_PLACE_MAX_IMAGES aliases bitty_term_state::IMAGE_STORE_MAX_ENTRIES
  (64) directly;
- KITTY_LEDGER_MAX_BYTES stays 320,000,000 and keeps the decode-byte
  compile-time headroom assertion.

Delete crates/bitty-rich/src/kitty.rs and its module/re-exports, update the
bound table, crate README, the kitty_apc doc mention, and the CTX-1087 parity
pin. Extend retired_surface_guard.rs to reject the retired file, module, and
identifiers. No behavior or golden changes.

* [CTX-1415] chore(architecture): retire bitty-rich wallpaper_theme (#2359)

Decide the disposition of crates/bitty-rich/src/wallpaper_theme.rs: retire.

Evidence at origin/main d67bb88: git grep finds zero consumers outside the
module and its lib.rs re-exports. The wallpaper-colorscheme feature that
shipped is plugin-side (CTX-1169 / #1976): the host exposes bitty.image.read
over approved wallpaper roots and crates/bitty-runtime/tests/plugin_colorscheme.rs
drives preview/confirm intents over the real bridge. Theme derivation is
presentation policy on the plugin side of the ADR 0014 split, so wiring this
module would invent an unaccepted Core contract.

Delete the module, its module/re-exports, the crate README mention, and extend
retired_surface_guard.rs to reject the file, module, and identifiers. No
behavior or golden changes; the plugin-side path is untouched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:architecture chore Chore / maintenance P2 Priority: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant