Orchestrata Ultimate › Tests › Reference › scripts › test_ast_live_sync
Tests reference — tests/scripts/test_ast_live_sync.py
Module of tests/scripts, split out because the directory page would be too large.
Prose pending.
tests/scripts/test_ast_live_sync.py
source · 33 tests · 614 lines
Tests for scripts/ast_live_sync.py — the Step 3.4 live code-intelligence
Covers: knowledge_graph.canonical_schema, knowledge_graph.sync
| Kind | Name | Line | Description |
|---|---|---|---|
| function | test_the_roots_come_from_the_declaration_not_a_literal |
134 | Module ids are dotted paths RELATIVE to the analyzer root. Parsing |
| function | test_an_undeclared_root_set_has_no_fallback |
153 | Refuse, never narrow. |
| function | test_parser_defaults_follow_the_declaration |
162 | |
| function | test_preserve_runtime_calls_reapplies_field_serialize_drops |
170 | serialize() reconstructs the AST from source and emits NO |
| function | test_preserve_runtime_calls_missing_summary_is_a_noop |
221 | No committed summary (no runtime capture) -> leave the AST as |
| function | test_watch_dirs_match_as_prefixes_not_first_components |
232 | A first-component match would accept everything under src/, which is |
| function | test_a_declared_extra_root_is_watchable |
247 | With scripts/ declared, a save under it is a graph event -- the |
| function | test_cache_built_from_another_root_is_refused_loudly |
261 | load_or_analyze treats a root mismatch as a cache miss and silently |
| function | test_a_missing_cache_is_not_an_error |
274 | No cache means a full parse, which is the correct first run. |
| function | test_non_python_files_are_ignored |
284 | |
| function | test_generated_and_vcs_paths_are_ignored |
292 | |
| function | test_paths_outside_the_repo_are_ignored |
298 | |
| function | test_ignore_fragments_are_anchored_with_slashes |
302 | Unanchored fragments would reject a legitimate module whose NAME |
| function | test_filter_changes_deduplicates_and_keeps_order |
309 | |
| function | test_first_pass_writes_the_whole_package |
326 | |
| function | test_second_pass_with_no_edit_writes_nothing |
341 | The hash map, not the watcher, decides what changed — an editor that |
| function | test_only_the_edited_module_is_resynced |
352 | |
| function | test_an_edit_is_visible_in_the_graph |
366 | The end the SLO measures: save a file, read the new symbol back. |
| function | test_a_declared_extra_root_is_analyzed_and_reaches_the_graph |
388 | A secondary tree (scripts/, claude/, tests/ in the real repo) is part of |
| function | test_a_cache_built_for_other_extra_roots_is_refused_loudly |
435 | The root SET is part of the cache's identity. load_or_analyze would |
| function | test_deleting_a_file_is_reported_as_removed |
460 | |
| function | test_deleting_a_file_removes_its_nodes_from_the_graph |
469 | Reporting a removal is not the same as performing it. |
| function | test_the_cache_is_rewritten_so_the_next_pass_is_warm |
509 | |
| function | test_passes_counter_advances |
520 | The unit's liveness signal. |
| function | test_file_save_to_graph_meets_the_five_second_slo |
528 | The Step 3.4 end-to-end budget, measured on a warm cache. |
| function | test_outcome_with_no_changes_is_not_reported_as_changed |
549 | |
| function | test_outcome_with_only_a_deletion_counts_as_changed |
554 | A removed module changed the graph even though nothing was reparsed. |
| function | test_resolve_prefers_the_cutover_key |
560 | |
| function | test_resolve_raises_rather_than_guessing_an_address |
564 | |
| function | test_default_cache_path_is_not_the_committed_ast_artifact |
569 | A live, always-on service defaulting onto the tracked |
| function | test_seed_cache_from_committed_artifact_populates_an_absent_sidecar |
583 | A cold sidecar must be seeded from the committed snapshot, not left |
| function | test_seed_cache_from_committed_artifact_is_a_noop_when_sidecar_exists |
599 | |
| function | test_seed_cache_from_committed_artifact_is_a_noop_for_the_artifact_itself |
611 | An explicit --cache plans/ast-ultimate.json override must never |