Implement approved-file import and integrity verification #55
No reviewers
Labels
No labels
area/deployment
area/governance
area/metadata
area/pipeline
area/search
type/data
type/design
type/implementation
type/testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Arkive/arkive!55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/issue-11-file-integrity-import"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
document_id.source.jsonanddocuments.jsonrecords.Implementation
The new
verify_approved_document(repository_root, document_id)operation:data/sources/<category>/<source-key>/layout in deterministic sorted order;review_status: accepted;source_idto match the authoritative source record;role: original;VerifiedDocumentresult on success;VerificationErrorwith a stable failure code and JSON-serializable details on failure.The approved boundary is the exact source directory containing the authoritative metadata, rather than the wider repository. Even an otherwise in-bound symbolic link is rejected so that committed originals remain direct, immutable files.
Processing approval remains separate from bundle eligibility. The verifier therefore does not require
license.bundleable: true.Verification coverage
The new test suite covers:
Validation
git diff --checkpython pipeline/validate/validate_records.pypython -m unittest discover -s tests -vpython -m ruff check src pipeline testspython -m ruff format --check src pipeline testspython -m pip checkResults:
Scope confirmation
src/arkive/file_integrity.pyandtests/test_file_integrity.py.Linked issue
Closes #11