Orchestrata Ultimate › Tests › Reference › session › hooks
Tests reference — tests/session/hooks
tests/session/hooks — 2 test modules, 68 test functions. Source tree: tests/session/hooks at commit 8a2cb42ad. Generated from the tests AST snapshot by scripts/gen-data-pages.py.
Prose pending.
Modules
| Module | Tests | Covers |
|---|---|---|
test_session_auto_start_hook.py |
49 | 4 |
test_session_fact_hook.py |
19 | 1 |
Module details
tests/session/hooks/test_session_auto_start_hook.py
source · 49 tests · 811 lines
Tests for session.hooks.session_auto_start_hook.
Covers: session.context, session.hooks.session_auto_start_hook, session.models, session.session
| Kind | Name | Line | Description |
|---|---|---|---|
| class | TestBuildSessionOutputCarryover |
97 | |
| method | TestBuildSessionOutputCarryover.test_surfaces_pending_work_items_with_priority |
98 | |
| method | TestBuildSessionOutputCarryover.test_no_carryover_section_when_no_pending_work |
119 | |
| method | TestBuildSessionOutputCarryover.test_handles_unreadable_context_gracefully |
125 | If ctx.read() blows up (files vanish underneath us), the function |
| class | TestLoadAstMetrics |
144 | |
| method | TestLoadAstMetrics.test_missing_file_returns_none |
145 | |
| method | TestLoadAstMetrics.test_valid_json_is_parsed |
148 | |
| method | TestLoadAstMetrics.test_malformed_json_returns_none |
155 | |
| class | TestFormatAstMetrics |
167 | |
| method | TestFormatAstMetrics.test_full_table |
168 | |
| method | TestFormatAstMetrics.test_missing_summary_defaults_to_zero |
186 | |
| class | TestFormatTopUnmapped |
198 | |
| method | TestFormatTopUnmapped.test_empty_ultimate_only_returns_nothing |
199 | |
| method | TestFormatTopUnmapped.test_within_limit_no_suffix |
203 | |
| method | TestFormatTopUnmapped.test_over_limit_adds_suffix_and_truncates |
210 | |
| class | TestSaveAstSnapshot |
226 | |
| method | TestSaveAstSnapshot.test_missing_src_returns_none |
227 | |
| method | TestSaveAstSnapshot.test_copies_snapshot_with_zero_padded_seq |
230 | |
| method | TestSaveAstSnapshot.test_oserror_on_copy_returns_none |
243 | |
| class | TestLoadPreviousSnapshot |
264 | |
| method | TestLoadPreviousSnapshot.test_missing_plans_dir_returns_none |
265 | |
| method | TestLoadPreviousSnapshot.test_empty_plans_dir_returns_none |
268 | |
| method | TestLoadPreviousSnapshot.test_skips_non_matching_and_future_seq_then_returns_past |
272 | |
| method | TestLoadPreviousSnapshot.test_corrupt_candidate_is_skipped_in_favor_of_older_valid_one |
298 | |
| class | TestFormatAstDiff |
323 | |
| method | TestFormatAstDiff.test_previous_none_returns_empty |
324 | |
| method | TestFormatAstDiff.test_readiness_deltas_positive_negative_and_zero |
327 | |
| method | TestFormatAstDiff.test_unmapped_delta_positive |
348 | |
| method | TestFormatAstDiff.test_unmapped_delta_negative |
354 | |
| method | TestFormatAstDiff.test_key_only_present_on_one_side |
360 | Union of readiness keys: a key present only in previous still |
| class | TestUpdateContextMd |
375 | |
| method | TestUpdateContextMd.test_data_none_is_a_noop |
376 | |
| method | TestUpdateContextMd.test_creates_file_when_missing |
380 | |
| method | TestUpdateContextMd.test_replaces_existing_current_state_section |
395 | |
| method | TestUpdateContextMd.test_prepends_when_no_current_state_section |
409 | |
| method | TestUpdateContextMd.test_oserror_on_read_is_caught |
418 | |
| method | TestUpdateContextMd.test_oserror_on_write_is_caught |
429 | |
| class | TestGenerateSessionPurpose |
453 | |
| method | TestGenerateSessionPurpose.test_includes_branch_and_commit_message |
454 | |
| method | TestGenerateSessionPurpose.test_truncates_long_commit_message |
474 | |
| method | TestGenerateSessionPurpose.test_detached_head_skips_branch_name |
490 | |
| method | TestGenerateSessionPurpose.test_nonexistent_cwd_falls_back_to_timestamp_only |
510 | |
| class | TestGenerateObjectives |
521 | |
| method | TestGenerateObjectives.test_pending_work_limited_to_five_with_priority_prefix |
522 | |
| method | TestGenerateObjectives.test_handoff_active_work_appended_and_deduped |
536 | |
| method | TestGenerateObjectives.test_broken_context_returns_empty_list |
553 | |
| class | TestMainAstPipeline |
572 | |
| method | TestMainAstPipeline.test_pipeline_success_and_metrics_surfaced_with_diff |
573 | |
| method | TestMainAstPipeline.test_pipeline_nonzero_exit_reports_stderr |
629 | |
| method | TestMainAstPipeline.test_pipeline_output_decode_error_is_caught |
646 | A pipeline that writes invalid UTF-8 to stdout makes |
| class | TestReadHookInput |
675 | |
| method | TestReadHookInput.test_valid_payload_is_parsed |
676 | |
| method | TestReadHookInput.test_empty_stdin_falls_back_to_defaults |
686 | |
| method | TestReadHookInput.test_malformed_json_falls_back_to_defaults |
694 | |
| class | TestMainGatingBranches |
709 | |
| method | TestMainGatingBranches.test_not_an_orchestrata_project_produces_no_output |
710 | Neither context.md nor packages/ exists -> main() returns silently. |
| method | TestMainGatingBranches.test_non_startup_source_prints_resumed_and_returns_early |
725 | |
| method | TestMainGatingBranches.test_begin_failure_is_reported_and_swallowed |
740 | A project detected only via packages/ (no context.md/context.json, |
| class | TestFormatGoalInjection |
771 | |
| method | TestFormatGoalInjection.test_no_goal_injects_nothing |
772 | |
| method | TestFormatGoalInjection.test_active_goal_is_injected_with_criteria_status |
777 | |
| method | TestFormatGoalInjection.test_met_criteria_show_as_checked |
795 | |
| method | TestFormatGoalInjection.test_blocked_goal_injects_blocker_reason |
804 |
tests/session/hooks/test_session_fact_hook.py
source · 19 tests · 177 lines
Tests for session.hooks.session_fact_hook.
Covers: session.hooks.session_fact_hook
| Kind | Name | Line | Description |
|---|---|---|---|
| class | TestExtractFacts |
34 | |
| method | TestExtractFacts.test_read_context |
35 | |
| method | TestExtractFacts.test_read_claude_md |
39 | |
| method | TestExtractFacts.test_read_other_file |
43 | |
| method | TestExtractFacts.test_bash_pytest_passing |
47 | |
| method | TestExtractFacts.test_bash_pytest_failing |
54 | |
| method | TestExtractFacts.test_bash_git_clean |
60 | |
| method | TestExtractFacts.test_bash_git_dirty |
64 | |
| method | TestExtractFacts.test_bash_git_commit |
68 | |
| method | TestExtractFacts.test_bash_git_push |
74 | |
| method | TestExtractFacts.test_write_context |
80 | |
| method | TestExtractFacts.test_write_handover |
84 | |
| method | TestExtractFacts.test_edit_context |
88 | |
| method | TestExtractFacts.test_unknown_tool |
92 | |
| method | TestExtractFacts.test_bash_no_exit_code |
96 | |
| class | TestStoreFacts |
101 | |
| method | TestStoreFacts.test_writes_jsonl |
110 | |
| method | TestStoreFacts.test_appends_to_existing |
125 | |
| method | TestStoreFacts.test_empty_facts_noop |
136 | |
| class | TestMain |
144 | |
| method | TestMain.test_invalid_json |
153 | |
| method | TestMain.test_extracts_and_stores |
160 |