← Về thư mục
tests/test_session_package.py
- _canonical · function · L71-L74 — def _canonical(value) -> bytes
- _repack · function · L77-L107 — def _repack(files: dict[str, bytes]) -> bytes
- _unpack · function · L110-L112 — def _unpack(data: bytes) -> dict[str, bytes]
- _corrupt_first_payload · function · L115-L123 — def _corrupt_first_payload(data: bytes) -> bytes
- _source · function · L126-L246 — def _source(tmp_path: Path)
- workspace · function · L132-L135 — def workspace(root_frame_id, branch_id)
- _portable_auto_mode_projection · function · L249-L493 — def _portable_auto_mode_projection(root: str, version_id: str) -> dict
- test_auto_mode_portability_rejects_cross_run_scope_and_audit_subject_drift · function · L496-L525 — def test_auto_mode_portability_rejects_cross_run_scope_and_audit_subject_drift()
- test_auto_mode_portability_normalizes_legacy_singular_finding_references · function · L528-L571 — def test_auto_mode_portability_normalizes_legacy_singular_finding_references()
- test_auto_mode_portability_makes_nonterminal_history_inert_and_is_bounded · function · L574-L601 — def test_auto_mode_portability_makes_nonterminal_history_inert_and_is_bounded()
- _attach_completion_delivery · function · L604-L661 — def _attach_completion_delivery( tmp_path: Path, store: Store, project: dict, root: str, artifact: dict, *, branch_id: str | None = None, status: str = "published", content: str = "Delivered prediction.csv.", message_metadata=None, created_at: int = 1234, )
- test_session_package_rejects_unresolved_revert_workspace · function · L664-L684 — def test_session_package_rejects_unresolved_revert_workspace(tmp_path)
- test_session_package_rejects_corrupt_empty_revert_marker · function · L687-L697 — def test_session_package_rejects_corrupt_empty_revert_marker(tmp_path)
- test_direct_session_export_rejects_branch_head_change_during_workspace_read · function · L700-L758 — def test_direct_session_export_rejects_branch_head_change_during_workspace_read( tmp_path, monkeypatch )
- paused_export_workspace · function · L716-L720 — def paused_export_workspace(args, *kwargs)
- export_package · function · L728-L732 — def export_package()
- test_session_package_is_deterministic_and_round_trips_durable_state · function · L761-L865 — def test_session_package_is_deterministic_and_round_trips_durable_state(tmp_path)
- test_import_replay_remaps_the_execution_log_generation_stamp · function · L868-L916 — def test_import_replay_remaps_the_execution_log_generation_stamp(tmp_path)
- test_session_import_clears_legacy_cell_generation_outside_package · function · L919-L957 — def test_session_import_clears_legacy_cell_generation_outside_package(tmp_path)
- test_imported_artifact_environment_generation_is_remapped_and_untrusted · function · L960-L1018 — def test_imported_artifact_environment_generation_is_remapped_and_untrusted(tmp_path)
- test_session_import_clears_legacy_snapshot_generation_outside_package · function · L1021-L1089 — def test_session_import_clears_legacy_snapshot_generation_outside_package(tmp_path)
- test_session_package_v1_carries_sanitized_inert_auto_mode_history · function · L1092-L1189 — def test_session_package_v1_carries_sanitized_inert_auto_mode_history( tmp_path, monkeypatch )
- capture_import · function · L1106-L1108 — def capture_import(projected, **context)
- test_session_package_v1_without_auto_mode_remains_importable · function · L1192-L1212 — def test_session_package_v1_without_auto_mode_remains_importable(tmp_path)
- test_session_package_round_trips_completion_delivery_with_local_exact_urls · function · L1215-L1308 — def test_session_package_round_trips_completion_delivery_with_local_exact_urls( tmp_path, )
- test_import_downgrades_review_proof_when_delivery_urls_and_scope_are_remapped · function · L1311-L1406 — def test_import_downgrades_review_proof_when_delivery_urls_and_scope_are_remapped( tmp_path, )
- test_session_package_rejects_delivery_envelope_without_ledger · function · L1409-L1431 — def test_session_package_rejects_delivery_envelope_without_ledger(tmp_path)
- test_session_package_legacy_v1_without_delivery_key_still_imports · function · L1434-L1449 — def test_session_package_legacy_v1_without_delivery_key_still_imports(tmp_path)
- test_delivery_url_remap_is_single_pass_for_overlapping_sources · function · L1452-L1465 — def test_delivery_url_remap_is_single_pass_for_overlapping_sources()
- test_delivery_url_remap_never_rewrites_a_longer_path_segment_prefix · function · L1468-L1478 — def test_delivery_url_remap_never_rewrites_a_longer_path_segment_prefix()
- test_session_package_remaps_committed_child_delivery_and_injection_banner · function · L1481-L1535 — def test_session_package_remaps_committed_child_delivery_and_injection_banner( tmp_path, )
- test_session_package_rejects_tampered_completion_delivery_graph · function · L1553-L1621 — def test_session_package_rejects_tampered_completion_delivery_graph( tmp_path, corruption )
- test_session_package_bounds_total_completion_delivery_relations · function · L1625-L1644 — def test_session_package_bounds_total_completion_delivery_relations( tmp_path, monkeypatch, direction )
- test_session_package_delivery_verification_budget_rejects_before_import_writes · function · L1647-L1692 — def test_session_package_delivery_verification_budget_rejects_before_import_writes( tmp_path, monkeypatch )
- workspace · function · L1664-L1667 — def workspace(root_frame_id, branch_id)
- test_session_package_refuses_redacted_delivery_projection · function · L1696-L1719 — def test_session_package_refuses_redacted_delivery_projection(tmp_path, projection)
- test_session_package_rejects_tamper_traversal_symlink_and_secret_payload · function · L1722-L1770 — def test_session_package_rejects_tamper_traversal_symlink_and_secret_payload(tmp_path)
- test_session_package_filters_provider_secrets_binary_large_and_env_variants · function · L1773-L1813 — def test_session_package_filters_provider_secrets_binary_large_and_env_variants( tmp_path, )
- test_session_package_rejects_version_filename_escape_and_corrupt_graph · function · L1816-L1855 — def test_session_package_rejects_version_filename_escape_and_corrupt_graph(tmp_path)
- test_session_package_round_trips_a_valid_active_child_branch · function · L1858-L1902 — def test_session_package_round_trips_a_valid_active_child_branch(tmp_path)
- test_session_package_accepts_legacy_checkpoint_without_domain_state · function · L1905-L1927 — def test_session_package_accepts_legacy_checkpoint_without_domain_state(tmp_path)
- test_session_package_preserves_revert_projection_without_reviving_abandoned_rows · function · L1930-L2065 — def test_session_package_preserves_revert_projection_without_reviving_abandoned_rows( tmp_path, )
- test_session_package_preserves_complete_provider_tool_group_with_new_ids · function · L2068-L2133 — def test_session_package_preserves_complete_provider_tool_group_with_new_ids(tmp_path)
- test_session_package_rejects_duplicate_and_dangling_identities · function · L2137-L2156 — def test_session_package_rejects_duplicate_and_dangling_identities( tmp_path, corruption )
- test_session_package_maps_crc_compression_and_ratio_failures_to_validation · function · L2159-L2184 — def test_session_package_maps_crc_compression_and_ratio_failures_to_validation( tmp_path, )
- test_session_package_quarantines_replay_hooks_and_unicode_allow · function · L2187-L2252 — def test_session_package_quarantines_replay_hooks_and_unicode_allow(tmp_path)
- test_confirmed_fresh_restart_is_the_only_quarantine_unlock · function · L2255-L2320 — def test_confirmed_fresh_restart_is_the_only_quarantine_unlock(tmp_path, monkeypatch)
- FakeRecoveryRuntime · class · L2271-L2284 — class FakeRecoveryRuntime
- fresh_manifests · method · L2272-L2273 — def fresh_manifests(self)
- run · method · L2275-L2276 — def run(self, _plan)
- kernel_status_event · method · L2278-L2284 — def kernel_status_event(self, result, recovery_id)
- test_session_package_export_refuses_silently_truncated_history · function · L2331-L2346 — def test_session_package_export_refuses_silently_truncated_history( tmp_path, monkeypatch, method_name, record_name, limit )
- test_session_package_import_fault_rolls_back_database_workspace_env_and_cas · function · L2357-L2432 — def test_session_package_import_fault_rolls_back_database_workspace_env_and_cas( tmp_path, monkeypatch, failure_hook )
- workspace · function · L2396-L2399 — def workspace(root_frame_id, branch_id)
- fail · function · L2407-L2408 — def fail(_args, *_kwargs)
- test_session_package_durable_snapshot_fault_never_reaches_delivery_bind · function · L2435-L2511 — def test_session_package_durable_snapshot_fault_never_reaches_delivery_bind( tmp_path, monkeypatch )
- workspace · function · L2451-L2454 — def workspace(root_frame_id, branch_id)
- write_then_fail · function · L2464-L2470 — def write_then_fail(destination, payload, *, expected_sha256)
- unexpected_bind · function · L2472-L2475 — def unexpected_bind(**_kwargs)
- test_quarantined_import_root_creation_rolls_back_if_setting_insert_fails · function · L2514-L2548 — def test_quarantined_import_root_creation_rolls_back_if_setting_insert_fails( tmp_path, )
- test_session_package_interrupt_after_atomic_root_reopens_quarantined_placeholder · function · L2551-L2612 — def test_session_package_interrupt_after_atomic_root_reopens_quarantined_placeholder( tmp_path, monkeypatch )
- workspace · function · L2566-L2567 — def workspace(root_frame_id, branch_id)
- interrupt_immediately · function · L2575-L2576 — def interrupt_immediately(_args, *_kwargs)
- test_session_package_delivery_pending_message_is_safe_across_process_interrupt · function · L2615-L2691 — def test_session_package_delivery_pending_message_is_safe_across_process_interrupt( tmp_path, monkeypatch )
- workspace · function · L2634-L2637 — def workspace(root_frame_id, branch_id)
- interrupt_before_bind · function · L2645-L2646 — def interrupt_before_bind(_args, *_kwargs)
- test_session_package_fault_after_delivery_bind_removes_all_local_relations · function · L2694-L2760 — def test_session_package_fault_after_delivery_bind_removes_all_local_relations( tmp_path, monkeypatch )
- workspace · function · L2711-L2714 — def workspace(root_frame_id, branch_id)
- fail_after_bind · function · L2722-L2729 — def fail_after_bind(_args, *_kwargs)
- _Hub · class · L2763-L2771 — class _Hub
- emitter · method · L2764-L2765 — def emitter(self, _root_frame_id)
- broadcast · method · L2767-L2768 — def broadcast(self, _root_frame_id, _event)
- drop_frame · method · L2770-L2771 — def drop_frame(self, _root_frame_id)
- test_http_session_export_waits_for_revert_fifo_and_keeps_head_workspace_aligned · function · L2774-L2902 — def test_http_session_export_waits_for_revert_fifo_and_keeps_head_workspace_aligned( tmp_path, monkeypatch )
- hold_revert_ticket · function · L2808-L2828 — def hold_revert_ticket()
- observed_queue · function · L2832-L2836 — def observed_queue(args, *kwargs)
- observed_export · function · L2841-L2843 — def observed_export(root_frame_id)
- export_over_http · function · L2857-L2861 — def export_over_http()
- test_session_package_gateway_routes_use_binary_export_and_raw_import · function · L2905-L2995 — def test_session_package_gateway_routes_use_binary_export_and_raw_import(tmp_path)
- test_a_real_export_carries_reproduction_notes_and_still_verifies · function · L2998-L3078 — def test_a_real_export_carries_reproduction_notes_and_still_verifies(tmp_path)
- test_the_verify_route_answers_without_importing · function · L3081-L3178 — def test_the_verify_route_answers_without_importing(tmp_path, monkeypatch)
- test_reproduce_notes_read_the_projections_the_exporter_builds · function · L3186-L3222 — def test_reproduce_notes_read_the_projections_the_exporter_builds()
- test_reproduce_notes_name_every_runtime_that_produced_an_artifact · function · L3225-L3246 — def test_reproduce_notes_name_every_runtime_that_produced_an_artifact()
- test_reproduce_notes_do_not_collapse_two_distinct_environments · function · L3249-L3285 — def test_reproduce_notes_do_not_collapse_two_distinct_environments()
- test_reproduce_notes_separate_two_r_environments_with_no_python_version · function · L3288-L3322 — def test_reproduce_notes_separate_two_r_environments_with_no_python_version()
- test_reproduce_notes_say_so_when_nothing_was_recorded · function · L3325-L3338 — def test_reproduce_notes_say_so_when_nothing_was_recorded()
- test_reproduce_notes_are_deterministic · function · L3341-L3359 — def test_reproduce_notes_are_deterministic()
- test_session_package_remaps_the_compaction_cover_group · function · L3362-L3422 — def test_session_package_remaps_the_compaction_cover_group(tmp_path)
- test_session_package_rejects_a_compaction_cover_it_cannot_map · function · L3425-L3440 — def test_session_package_rejects_a_compaction_cover_it_cannot_map(tmp_path)
- test_session_package_screens_the_imported_compaction_handoff · function · L3443-L3472 — def test_session_package_screens_the_imported_compaction_handoff(tmp_path)
- _package_identity_scope · function · L3475-L3518 — def _package_identity_scope(files: dict[str, bytes]) -> dict[str, object]
- _valid_portable_observation · function · L3521-L3546 — def _valid_portable_observation(files: dict[str, bytes]) -> dict
- _portable_observation_document · function · L3549-L3556 — def _portable_observation_document(observations: list[dict]) -> bytes
- _frozen_portable_observation_preflight · function · L3559-L3704 — def _frozen_portable_observation_preflight( payload: bytes, *, scope: dict[str, object] ) -> list[dict]
- _probe_old_importer · function · L3707-L3718 — def _probe_old_importer(domain, package: bytes) -> dict
- _imported_observation_count · function · L3721-L3730 — def _imported_observation_count(store, root_frame_id: str) -> int
- test_current_exporter_does_not_write_artifact_observations · function · L3733-L3747 — def test_current_exporter_does_not_write_artifact_observations(tmp_path)
- test_old_importer_accepts_v1_package_without_artifact_observations · function · L3750-L3770 — def test_old_importer_accepts_v1_package_without_artifact_observations(tmp_path)
- test_old_importer_ignores_listed_artifact_observations_file · function · L3773-L3803 — def test_old_importer_ignores_listed_artifact_observations_file(tmp_path)
- test_old_importer_rejects_unlisted_extra_file · function · L3806-L3834 — def test_old_importer_rejects_unlisted_extra_file(tmp_path)
- test_old_importer_ignores_unknown_listed_optional_file · function · L3837-L3850 — def test_old_importer_ignores_unknown_listed_optional_file(tmp_path)
- test_old_importer_rejects_secret_canary_in_optional_observation_file · function · L3853-L3872 — def test_old_importer_rejects_secret_canary_in_optional_observation_file(tmp_path)
- test_portable_observation_in_scope_record_passes_preflight · function · L3875-L3901 — def test_portable_observation_in_scope_record_passes_preflight(tmp_path)
- test_portable_observation_record_limit_fails_closed · function · L3904-L3924 — def test_portable_observation_record_limit_fails_closed(tmp_path)
- test_portable_observation_file_size_limit_fails_closed · function · L3927-L3942 — def test_portable_observation_file_size_limit_fails_closed(tmp_path)
- test_portable_observation_path_canary_fails_closed · function · L3945-L3968 — def test_portable_observation_path_canary_fails_closed(tmp_path)
- test_portable_observation_malicious_references_fail_closed · function · L3983-L4022 — def test_portable_observation_malicious_references_fail_closed( tmp_path, corruption, match )
- test_portable_observation_v1_enablement_conclusion · function · L4025-L4068 — def test_portable_observation_v1_enablement_conclusion(tmp_path)