Files
svfs/docs/evidence-after.txt
chakcy 1620d3eb5a docs: 补 README 能力章节、缺陷报告与两份设计说明
- README:新增「数据能力」四节(内容寻址去重 / 快照与时间旅行 / 完整性校验与签名 /
  增量打包)与「发布到对象存储」一节,附实测对比表;重写「要不要用 --compress」
  (结论从"别用"反转为"默认就该开")、「迁移旧格式」;修正项目结构与字段表
- BUG_REPORT.md:13 节,含 P0/P1 逐条分析、P2/P3 清单、五批后续追加的记录,
  以及过程中被推翻的两处结论(第九节的压缩建议、P3-1 的 uv sync 判断)
- docs/encryption-design.md:加密的设计说明——去重与随机 nonce 的冲突、
  标准库没有密码学原语、以及现有 freq_blob 可作为每块附加数据的槽位
- docs/evidence-*.txt:各阶段的测试运行证据(修复前 / 修复后 / 双环境)
2026-09-14 00:11:53 +08:00

111 lines
11 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
test_pack_missing_source_returns_nonzero (test_cli.CliFailureTest.test_pack_missing_source_returns_nonzero) ... ok
test_pack_to_missing_output_directory_reports_clean_error (test_cli.CliFailureTest.test_pack_to_missing_output_directory_reports_clean_error) ... ok
test_unpack_missing_db_returns_nonzero (test_cli.CliFailureTest.test_unpack_missing_db_returns_nonzero) ... ok
test_unpack_missing_path_returns_nonzero (test_cli.CliFailureTest.test_unpack_missing_path_returns_nonzero) ... ok
test_unpack_non_database_file_reports_clean_error (test_cli.CliFailureTest.test_unpack_non_database_file_reports_clean_error) ... ok
test_exclude_prunes_directory_subtree (test_cli.CliPackTest.test_exclude_prunes_directory_subtree) ... ok
test_exclude_supports_glob_patterns (test_cli.CliPackTest.test_exclude_supports_glob_patterns)
P1-9: README 承诺 glob 语义,`*.log` 必须真的排除 .log 文件, ... ok
test_pack_reports_file_count_matching_database (test_cli.CliPackTest.test_pack_reports_file_count_matching_database) ... ok
test_pack_stores_every_file (test_cli.CliPackTest.test_pack_stores_every_file) ... ok
test_full_roundtrip_via_cli (test_cli.CliUnpackTest.test_full_roundtrip_via_cli) ... ok
test_ignore_timestamps_full_export_does_not_recurse (test_cli.CliUnpackTest.test_ignore_timestamps_full_export_does_not_recurse)
P0-3: --ignore-timestamps 曾把 export_filesystem 赋成引用自身的 lambda。 ... ok
test_ignore_timestamps_with_path_subdirectory (test_cli.CliUnpackTest.test_ignore_timestamps_with_path_subdirectory) ... ok
test_list_root_only_shows_top_level (test_cli.CliUnpackTest.test_list_root_only_shows_top_level)
P0-2: 根目录列表不能把整张表铺平。 ... ok
test_path_exports_single_file (test_cli.CliUnpackTest.test_path_exports_single_file) ... ok
test_path_exports_subdirectory_with_contents (test_cli.CliUnpackTest.test_path_exports_subdirectory_with_contents) ... ok
test_rejects_old_schema_database_cleanly (test_cli.CliUnpackTest.test_rejects_old_schema_database_cleanly)
P1-7: 旧格式库要给出明确提示,退出码非 0,且不能是 traceback。 ... ok
test_duplicate_add_file_is_reported_and_keeps_first_content (test_core.AddFileConflictTest.test_duplicate_add_file_is_reported_and_keeps_first_content) ... E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py:264: DeprecationWarning: The default datetime adapter is deprecated as of Python 3.12; see the sqlite3 documentation for suggested replacement recipes
cursor.execute(
ok
test_directories_come_before_files (test_core.DirectoryListingTest.test_directories_come_before_files) ... ok
test_leaf_directory_is_empty (test_core.DirectoryListingTest.test_leaf_directory_is_empty) ... ok
test_nested_directory_lists_its_children (test_core.DirectoryListingTest.test_nested_directory_lists_its_children) ... ok
test_paths_are_returned_as_dicts_with_datetime (test_core.DirectoryListingTest.test_paths_are_returned_as_dicts_with_datetime) ... ok
test_root_lists_top_level_only (test_core.DirectoryListingTest.test_root_lists_top_level_only) ... ok
test_subdirectory_lists_its_children (test_core.DirectoryListingTest.test_subdirectory_lists_its_children) ... ok
test_export_directory_full_tree (test_core.ExportTest.test_export_directory_full_tree) ... ok
test_export_file_accepts_bare_filename (test_core.ExportTest.test_export_file_accepts_bare_filename)
P1-6: local_path 没有目录部分时 dirname 为 '',不能抛 FileNotFoundError。 ... ok
test_export_file_writes_exact_bytes (test_core.ExportTest.test_export_file_writes_exact_bytes) ... ok
test_export_filesystem_matches_tree (test_core.ExportTest.test_export_filesystem_matches_tree) ... ok
test_export_subdirectory_does_not_recurse_forever (test_core.ExportTest.test_export_subdirectory_does_not_recurse_forever)
P0-2: list_directory 按 path 过滤时,导出 doc 会无限自我递归。 ... ok
test_below_threshold_is_not_compressed (test_core.FileContentTest.test_below_threshold_is_not_compressed) ... ok
test_compressible_file_uses_huffman (test_core.FileContentTest.test_compressible_file_uses_huffman) ... ok
test_empty_file_roundtrip (test_core.FileContentTest.test_empty_file_roundtrip) ... ok
test_file_size_recorded_matches_content (test_core.FileContentTest.test_file_size_recorded_matches_content) ... ok
test_incompressible_file_falls_back_to_none (test_core.FileContentTest.test_incompressible_file_falls_back_to_none) ... ok
test_read_file_offset_and_size (test_core.FileContentTest.test_read_file_offset_and_size) ... ok
test_read_file_rejects_directory_and_missing_path (test_core.FileContentTest.test_read_file_rejects_directory_and_missing_path) ... ok
test_small_file_roundtrip (test_core.FileContentTest.test_small_file_roundtrip) ... ok
test_mk_dir_creates_directory (test_core.MkDirTest.test_mk_dir_creates_directory) ... E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py:425: DeprecationWarning: The default datetime adapter is deprecated as of Python 3.12; see the sqlite3 documentation for suggested replacement recipes
cursor.execute(
ok
test_mk_dir_existing_raises_cleanly (test_core.MkDirTest.test_mk_dir_existing_raises_cleanly) ... ok
test_mv_dir_does_not_touch_prefix_sibling (test_core.MoveAndRemoveTest.test_mv_dir_does_not_touch_prefix_sibling) ... ok
test_mv_dir_into_existing_parent_directory (test_core.MoveAndRemoveTest.test_mv_dir_into_existing_parent_directory) ... ok
test_mv_dir_into_itself_raises (test_core.MoveAndRemoveTest.test_mv_dir_into_itself_raises) ... ok
test_mv_dir_rename_is_not_applied_twice (test_core.MoveAndRemoveTest.test_mv_dir_rename_is_not_applied_twice)
P1-2: mv_dir("doc","doc_new") 的第二条 UPDATE 会再次命中已改名的目录自身。 ... ok
test_mv_dir_root_creates_destination_and_fixes_parent_paths (test_core.MoveAndRemoveTest.test_mv_dir_root_creates_destination_and_fixes_parent_paths)
P1-3: 把根目录整体移进 archive 时,archive 目录行必须存在, ... ok
test_mv_dir_to_existing_destination_raises_and_keeps_source (test_core.MoveAndRemoveTest.test_mv_dir_to_existing_destination_raises_and_keeps_source) ... ok
test_mv_dir_to_missing_parent_raises (test_core.MoveAndRemoveTest.test_mv_dir_to_missing_parent_raises)
目标的父目录不存在时要明确报错,而不是造出一个不可达的目录。 ... ok
test_mv_dir_updates_children_parent_paths (test_core.MoveAndRemoveTest.test_mv_dir_updates_children_parent_paths) ... ok
test_mv_file_updates_name_and_parent (test_core.MoveAndRemoveTest.test_mv_file_updates_name_and_parent) ... ok
test_remove_directory_does_not_touch_prefix_sibling (test_core.MoveAndRemoveTest.test_remove_directory_does_not_touch_prefix_sibling)
删除 doc 不能连带删掉 docs(LIKE 'doc%' 会把 docs 一起匹配上)。 ... ok
test_remove_file_with_percent_is_not_a_wildcard (test_core.MoveAndRemoveTest.test_remove_file_with_percent_is_not_a_wildcard) ... ok
test_remove_file_with_underscore_is_not_a_wildcard (test_core.MoveAndRemoveTest.test_remove_file_with_underscore_is_not_a_wildcard)
文件名里的 _ 不能被当成 LIKE 的单字符通配符。 ... ok
test_remove_missing_path_reports_error (test_core.MoveAndRemoveTest.test_remove_missing_path_reports_error) ... ok
test_add_file_survives_close_without_further_commit (test_core.PersistenceTest.test_add_file_survives_close_without_further_commit) ... ok
test_fresh_database_is_accepted (test_core.SchemaCompatibilityTest.test_fresh_database_is_accepted) ... ok
test_non_sqlite_file_is_rejected (test_core.SchemaCompatibilityTest.test_non_sqlite_file_is_rejected) ... ok
test_repository_sample_db_is_rejected (test_core.SchemaCompatibilityTest.test_repository_sample_db_is_rejected) ... ok
test_synthesized_old_schema_db_is_rejected (test_core.SchemaCompatibilityTest.test_synthesized_old_schema_db_is_rejected) ... ok
test_add_file_actually_stores_a_row (test_core.SchemaContractTest.test_add_file_actually_stores_a_row)
add_file 之后库里必须真的有这条记录。 ... ok
test_expected_columns_exist (test_core.SchemaContractTest.test_expected_columns_exist) ... ok
test_bad_magic_rejected (test_huffman.HeaderValidationTest.test_bad_magic_rejected) ... ok
test_single_symbol_payload_is_not_validated (test_huffman.HeaderValidationTest.test_single_symbol_payload_is_not_validated)
记录既有行为(非缺陷):单符号数据解压时直接按原长度展开,完全不读 payload, ... ok
test_too_short_blob_rejected (test_huffman.HeaderValidationTest.test_too_short_blob_rejected) ... ok
test_truncated_payload_rejected (test_huffman.HeaderValidationTest.test_truncated_payload_rejected) ... ok
test_wrong_freq_blob_size_rejected (test_huffman.HeaderValidationTest.test_wrong_freq_blob_size_rejected) ... ok
test_all_256_byte_values (test_huffman.RoundTripTest.test_all_256_byte_values) ... ok
test_binary_with_nulls_and_high_bytes (test_huffman.RoundTripTest.test_binary_with_nulls_and_high_bytes) ... ok
test_empty (test_huffman.RoundTripTest.test_empty) ... ok
test_incompressible_random (test_huffman.RoundTripTest.test_incompressible_random) ... ok
test_just_above_core_threshold (test_huffman.RoundTripTest.test_just_above_core_threshold) ... ok
test_repetitive_text_compresses (test_huffman.RoundTripTest.test_repetitive_text_compresses) ... ok
test_single_byte (test_huffman.RoundTripTest.test_single_byte) ... ok
test_single_symbol_repeated (test_huffman.RoundTripTest.test_single_symbol_repeated) ... ok
test_two_symbols (test_huffman.RoundTripTest.test_two_symbols) ... ok
test_utf8_chinese (test_huffman.RoundTripTest.test_utf8_chinese) ... ok
test_compression_reduces_database_size (test_roundtrip.RoundTripTest.test_compression_reduces_database_size)
用一个足够大的重复文本,让压缩效果超过 SQLite 页粒度(4KB)的噪声。 ... ok
test_every_source_file_is_stored (test_roundtrip.RoundTripTest.test_every_source_file_is_stored)
P0-1:打包后库里必须有和源目录一一对应的文件记录。 ... E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py:214: DeprecationWarning: The default datetime adapter is deprecated as of Python 3.12; see the sqlite3 documentation for suggested replacement recipes
cursor.execute(
ok
test_metadata_counts_match_database (test_roundtrip.RoundTripTest.test_metadata_counts_match_database)
P1-5:上报的统计数字必须来自真实入库的数据,而不是遍历计数。 ... ok
test_packed_database_contains_no_duplicate_paths (test_roundtrip.RoundTripTest.test_packed_database_contains_no_duplicate_paths) ... ok
test_roundtrip_with_compression (test_roundtrip.RoundTripTest.test_roundtrip_with_compression) ... ok
test_roundtrip_with_ignore_timestamps (test_roundtrip.RoundTripTest.test_roundtrip_with_ignore_timestamps) ... ok
test_roundtrip_without_compression (test_roundtrip.RoundTripTest.test_roundtrip_without_compression) ... ok
test_stored_blob_of_compressible_file_is_smaller (test_roundtrip.RoundTripTest.test_stored_blob_of_compressible_file_is_smaller)
压缩不只是"标记了一下":库里真正存的字节必须变少。 ... ok
----------------------------------------------------------------------
Ran 81 tests in 6.741s
OK
EXIT=0