← Về thư mục
tests/test_code_evidence.py
- _write · function · L50-L54 — def _write(root: Path, rel: str, text: str) -> Path
- _sha · function · L57-L58 — def _sha(path: Path) -> str
- _Cells · class · L61-L70 — class _Cells
- init · method · L64-L66 — def init(self, rows)
- call · method · L68-L70 — def call(self, cell_id)
- tree · function · L74-L90 — def tree(tmp_path)
- _context · function · L93-L126 — def _context(tree, cells=None, frame_id="frame-1")
- _payload · function · L129-L149 — def _payload(tree, **overrides)
- _record_test_cell · function · L152-L194 — def _record_test_cell( store, frame: str, *, turn_id: str, command: str, cell_id: str = "cell-test", branch_id: str | None = None, bash_ok: bool = True, with_receipt: bool = True, )
- test_only_the_two_code_modes_require_evidence · function · L202-L206 — def test_only_the_two_code_modes_require_evidence()
- test_an_analysis_turn_is_never_asked_for_code_evidence · function · L210-L219 — def test_an_analysis_turn_is_never_asked_for_code_evidence(mode, tree)
- test_a_real_structured_deliverable_is_accepted · function · L228-L232 — def test_a_real_structured_deliverable_is_accepted(mode, tree)
- test_each_field_is_required_and_named_in_the_refusal · function · L236-L243 — def test_each_field_is_required_and_named_in_the_refusal(missing, tree)
- test_an_unverifiable_runtime_refuses_rather_than_waving_it_through · function · L246-L253 — def test_an_unverifiable_runtime_refuses_rather_than_waving_it_through(tree)
- test_a_deleted_source_file_is_refused · function · L261-L267 — def test_a_deleted_source_file_is_refused(tree)
- test_a_source_file_outside_the_evidence_roots_is_refused · function · L271-L280 — def test_a_source_file_outside_the_evidence_roots_is_refused(claim, tree)
- test_a_mismatched_sha256_is_refused · function · L283-L291 — def test_a_mismatched_sha256_is_refused(tree)
- test_a_file_that_was_never_captured_as_an_artifact_is_refused · function · L294-L301 — def test_a_file_that_was_never_captured_as_an_artifact_is_refused(tree)
- test_another_sessions_same_path_and_bytes_are_not_source_evidence · function · L304-L339 — def test_another_sessions_same_path_and_bytes_are_not_source_evidence(tmp_path)
- test_same_basename_elsewhere_and_bytes_changed_after_capture_are_refused · function · L342-L388 — def test_same_basename_elsewhere_and_bytes_changed_after_capture_are_refused(tmp_path)
- test_source_hashing_refuses_secret_files_before_disclosing_a_digest · function · L392-L434 — def test_source_hashing_refuses_secret_files_before_disclosing_a_digest( tmp_path, relative )
- test_source_hashing_refuses_a_benign_named_symlink_alias_to_a_secret · function · L437-L478 — def test_source_hashing_refuses_a_benign_named_symlink_alias_to_a_secret(tmp_path)
- test_an_empty_source_list_is_not_a_deliverable · function · L481-L487 — def test_an_empty_source_list_is_not_a_deliverable(tree)
- test_a_python_entry_point_that_does_not_compile_is_refused · function · L495-L502 — def test_a_python_entry_point_that_does_not_compile_is_refused(tree)
- test_verifying_an_entry_point_compiles_it_and_never_runs_it · function · L505-L525 — def test_verifying_an_entry_point_compiles_it_and_never_runs_it(tree, tmp_path)
- test_an_r_entry_point_is_existence_checked_not_parsed_as_python · function · L528-L545 — def test_an_r_entry_point_is_existence_checked_not_parsed_as_python(tree)
- test_an_empty_entry_point_list_is_refused · function · L548-L554 — def test_an_empty_entry_point_list_is_refused(tree)
- test_a_forged_cell_id_is_refused · function · L562-L571 — def test_a_forged_cell_id_is_refused(tree)
- test_an_empty_execution_log_is_named_instead_of_a_phantom_cell · function · L574-L590 — def test_an_empty_execution_log_is_named_instead_of_a_phantom_cell(tree)
- test_a_missing_cell_in_a_recorded_runtime_keeps_the_phantom_wording · function · L593-L604 — def test_a_missing_cell_in_a_recorded_runtime_keeps_the_phantom_wording(tree)
- test_a_failed_cell_cannot_back_a_passing_claim · function · L607-L618 — def test_a_failed_cell_cannot_back_a_passing_claim(tree)
- test_printing_passing_looking_output_is_not_a_test_receipt · function · L621-L633 — def test_printing_passing_looking_output_is_not_a_test_receipt(tree)
- test_a_receipt_for_command_a_cannot_back_command_b · function · L636-L647 — def test_a_receipt_for_command_a_cannot_back_command_b(tree)
- test_shell_composition_cannot_mask_a_failed_test · function · L663-L681 — def test_shell_composition_cannot_mask_a_failed_test(command, tree)
- test_non_masking_shell_forms_remain_valid_evidence_commands · function · L693-L694 — def test_non_masking_shell_forms_remain_valid_evidence_commands(command)
- test_a_successful_receipt_does_not_depend_on_model_controlled_stdout · function · L697-L704 — def test_a_successful_receipt_does_not_depend_on_model_controlled_stdout(tree)
- test_the_store_receipt_binds_exact_command_cell_turn_and_branch · function · L707-L735 — def test_the_store_receipt_binds_exact_command_cell_turn_and_branch(tmp_path)
- test_print_only_and_nonzero_shell_runs_do_not_create_passing_receipts · function · L739-L762 — def test_print_only_and_nonzero_shell_runs_do_not_create_passing_receipts( tmp_path, with_receipt, bash_ok )
- test_a_real_cell_from_another_session_is_not_this_runs_evidence · function · L765-L776 — def test_a_real_cell_from_another_session_is_not_this_runs_evidence(tree)
- test_test_evidence_without_a_cell_id_is_refused · function · L779-L785 — def test_test_evidence_without_a_cell_id_is_refused(tree)
- test_the_failure_reader_is_anchored_rather_than_keyword_soup · function · L802-L803 — def test_the_failure_reader_is_anchored_rather_than_keyword_soup(text, flagged)
- test_submit_output_refuses_a_code_mode_completion_without_evidence · function · L811-L820 — def test_submit_output_refuses_a_code_mode_completion_without_evidence(tree)
- test_submit_output_accepts_and_carries_the_verified_declarations · function · L823-L839 — def test_submit_output_accepts_and_carries_the_verified_declarations(tree)
- test_submit_output_is_revoked_when_verified_source_changes_after_submit · function · L842-L863 — def test_submit_output_is_revoked_when_verified_source_changes_after_submit(tree)
- test_non_python_entry_point_bytes_are_sealed_after_submit · function · L866-L885 — def test_non_python_entry_point_bytes_are_sealed_after_submit(tree)
- test_an_analysis_submission_envelope_is_byte_for_byte_what_it_was · function · L888-L898 — def test_an_analysis_submission_envelope_is_byte_for_byte_what_it_was(tree)
- test_a_broken_evidence_store_refuses_instead_of_degrading · function · L901-L915 — def test_a_broken_evidence_store_refuses_instead_of_degrading(tree)
- explode · function · L902-L903 — def explode()
- _finalize · function · L918-L929 — def _finalize(arguments, code_evidence=None)
- test_finalize_declares_the_four_optional_fields_on_a_still_closed_schema · function · L932-L941 — def test_finalize_declares_the_four_optional_fields_on_a_still_closed_schema()
- test_finalize_refuses_a_code_mode_payload_whose_evidence_fails · function · L944-L956 — def test_finalize_refuses_a_code_mode_payload_whose_evidence_fails(tree)
- test_finalize_accepts_a_verified_code_mode_payload · function · L959-L968 — def test_finalize_accepts_a_verified_code_mode_payload(tree)
- test_finalize_without_the_hook_is_exactly_what_it_was · function · L971-L974 — def test_finalize_without_the_hook_is_exactly_what_it_was(tree)
- test_the_context_reads_artifact_names_and_the_execution_log_from_the_store · function · L982-L1065 — def test_the_context_reads_artifact_names_and_the_execution_log_from_the_store( tmp_path, )
- test_the_gathered_context_knows_whether_the_runtime_recorded_any_cells · function · L1068-L1086 — def test_the_gathered_context_knows_whether_the_runtime_recorded_any_cells( tmp_path, )