记录(08-23-isolated-backup-restore-drill): 固化Attempt 4执行前门禁

这个提交包含在:
2026-08-25 13:20:45 +08:00
父节点 5ec7db13b2
当前提交 f216387837
共修改 3 个文件,包含 46 行新增和 1 行删除
@@ -1374,6 +1374,10 @@ validate_copied_batch(private/batch, source_metadata)
start, dump list, target confirmation, restore apply and storage restore each
append a fixed stage marker and their private output, so a later failure does
not erase earlier-stage diagnostics before final teardown.
- A source migration fingerprint enumerates only direct directory objects under
`server/prisma/migrations` at the source commit, validates every directory
name, sorts the names and hashes that exact non-empty set. Files such as
`migration_lock.toml` are not migrations and must never enter the fingerprint.
### 4. Validation & Error Matrix
@@ -1398,6 +1402,9 @@ validate_copied_batch(private/batch, source_metadata)
remains valid for a locally protected render.
- Any raw-log truncating redirect after initialization, or a missing fixed stage
marker -> tracked contract failure; do not publish a candidate.
- A source-tree listing that mixes migration directories with ordinary files ->
reject the generator result or filter by Git directory object type before
hashing; never reinterpret the extra file as schema drift.
- Candidate differs from the deterministic render or has not passed the tracked
contract -> do not upload or install it.
@@ -1436,6 +1443,9 @@ validate_copied_batch(private/batch, source_metadata)
- Statically require exactly one raw-log truncation at initialization and fixed
append markers for container start, dump list, target confirmation, restore
apply and storage restore.
- Build a source-tree fixture containing migration directories plus
`migration_lock.toml`; assert the fingerprint includes only sorted directory
names and still matches the restored successful migration set.
- Directly test source/copy identity, dynamic migration fingerprint and the
tracked attachment validator. Run `check-sensitive-content.mjs` explicitly on
all three tracked runner assets and require zero findings.