chore: remove dead code in observation and tart modules#131
Merged
Conversation
- observation::save_a11y_tree: gate behind #[cfg(test)] since it's only used in tests (the production version lives in provider/helpers.rs) - TartSession::vm_name: drop stale #[allow(dead_code)] β the method is actively called from interactive.rs Tracking issue for the remaining TartSession accessor scaffolding (shared_dir, guest_shared_dir): #125 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR is a targeted dead-code cleanup touching two files with no behavioral changes.
Both changes are minimal, accurate, and verified against the codebase. No issues found. Confidence Score: 5/5Safe to merge β purely dead-code cleanup with no behavioral changes Both changes are verified correct: save_a11y_tree is only used in tests, and vm_name() is actively called. No P0/P1 issues found. No files require special attention Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[A11y Tree Data] --> B{Which path?}
B -->|Production| C[provider/helpers.rs\nsave_a11y_tree\npub crate]
B -->|Test only| D[observation.rs\nsave_a11y_tree\ncfg test - private]
C --> E[claude_cli.rs:265\nactive production caller]
D --> F[observation.rs tests\ntest_save_a11y_tree\ntest_save_a11y_tree_creates_file]
Reviews (1): Last reviewed commit: "chore: remove dead code in observation a..." | Re-trigger Greptile |
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
observation::save_a11y_tree: gate behind#[cfg(test)]since it's only used in tests. The production a11y-saving function lives inprovider/helpers.rsand remains the active one used byclaude_cli.rs.TartSession::vm_name: drop stale#[allow(dead_code)]annotation β the method is actively called frominteractive.rs:378-379. Git history shows the annotation was added ~2 hours before the actual callers were added in commit0291c6dand was never cleaned up.Background
Came out of a dead-code audit. Three top-priority items were investigated by sub-agents:
observation::save_a11y_treeβ confirmed dead, fixed hereTartSession::guest_shared_dirfield/accessor β false positive (intentional architectural symmetry withWindowsVmSession); tracked in Remove #[allow(dead_code)] from TartSession accessors once wired upΒ #125 for later cleanup once wired up#[allow(dead_code)]onTartSession::vm_nameβ confirmed stale, fixed hereTest plan
cargo buildβ cleancargo testβ all 533 tests passπ€ Generated with Claude Code