Evidence record identity
Stable evidence ID, phase source, role scope, subject scope, route source, and proof type.
Every future evidence record can be traced back to the QA gate that produced it.
A schema-first design gate for evidence metadata, storage references, audit fields, redaction markers, review decisions, and retention signals before any storage implementation exists.
Metadata fields
18
identity, scope, proof, status
Storage refs
9
future object references only
Audit fields
12
created, classified, reviewed
Runtime writes
0
no table or file creation
Stable evidence ID, phase source, role scope, subject scope, route source, and proof type.
Every future evidence record can be traced back to the QA gate that produced it.
References future storage objects without creating buckets, upload APIs, download APIs, or files.
Storage can be swapped later without changing review truth.
Privacy class, sensitivity reason, redaction markers, forbidden content flags, and demo-safe status.
No CNIC, wallet PIN, provider secret, live credential, or customer-private data leaks by contract.
Structured decisions for draft review, hold, rejected, approved internal, approved demo-safe, or restored.
Manual review stays visible, auditable, and maker-checker ready.
Created, classified, redacted, reviewed, exported, deleted, restored, and retention review markers.
Future storage can follow data protection and audit rules without guesswork.
Defines required fields and blocked mutations while leaving runtime implementation for later approval gates.
Phase 176 produces design truth, not database truth.
Metadata schema
Stable unique record key.
Example: Phase 174, 175, or 176.
Gate or page code that created the evidence candidate.
Route that evidence is about.
Supplier, Manufacturer, Wholesaler, Retailer, Customer, Rider, Founder/Admin, or System.
route, module, role, order, payment, ledger, inventory, PO, GRN, invoice, support.
Reference only; no private payload copied into evidence.
Human-readable evidence title.
Short safe summary for QA review.
Allowed from Phase 174 proof types: , , , , , .
Allowed lanes: visual-screenshot, review-note, boundary-proof, mobile-proof, review-decision.
Allowed classes: Public-safe, Internal, Restricted, Forbidden.
Required when privacy class is Internal, Restricted, or Forbidden.
manual-note, screenshot-reference, mobile-proof, boundary-proof, decision-record.
When evidence was captured or referenced.
Actor reference, not full profile.
Draft, hold, approved, rejected, deleted pending retention, or restored.
Search tags with allowlisted vocabulary later.
Storage reference contract
storageProviderKey
string|nullFuture provider alias only; never provider credentials.
bucketOrContainerRef
string|nullFuture logical container reference, not a public URL.
objectKeyRef
string|nullFuture object key reference after upload is approved.
redactedObjectKeyRef
string|nullSeparate future reference for redacted copy.
checksumSha256
string|nullIntegrity hash once storage exists.
mimeType
string|nullAllowlisted content type, not trusted from browser alone.
byteSize
number|nullSize limit check once uploads exist.
dimensions
object|nullWidth and height for visual evidence only.
signedViewPolicyRef
string|nullFuture signed-view policy reference, not the signed URL itself.
Audit contract
Who created the evidence record candidate.
Who assigned privacy and sensitivity.
Who applied redaction or locked content.
Who reviewed the evidence packet.
Who made the final approved state.
Who exported and why.
Who requested deletion under retention rules.
Who restored evidence after incident approval.
Latest human decision marker.
Future maker-checker chain reference.
Date evidence should be reviewed for deletion or continued hold.
Future immutable audit reference, not the audit rows themselves.
Decision states
Evidence is only a draft candidate.
Evidence cannot be shared until sensitive portions are masked.
Evidence is locked to security/founder review.
Evidence can be used internally for QA or developer correction.
Evidence is safe to show in demo or founder walkthrough.
Evidence is invalid, unsafe, duplicate, or not useful.
Deletion requested but retention/audit rules still apply.
Evidence restored with incident approval and audit trail.
Redaction markers
none
No sensitive area found after review.
crop
Crop unrelated browser/device/customer area.
blur
Blur visible private or operational details.
mask_text
Mask token-like, ID-like, phone, CNIC, or account text.
remove_metadata
Strip EXIF/device/browser metadata before storage.
replace_reference
Store a safe reference instead of the original sensitive object.
hard_block
Block forbidden evidence from being uploaded or retained.
Contract relations
Phase 174 evidence candidate
Candidate proof is normalized into a scoped record with role, route, proof type, and privacy class.
Evidence permission gate
Allowed actions stay aligned with 8 Phase 175 permission actions.
Evidence metadata record
Metadata points to future storage reference; storage object is never embedded into the record.
Storage reference
Reviewer can decide internal/demo-safe status only after privacy and redaction checks.
Review decision
Every decision, export, deletion, and restoration must become audit evidence later.
Validation rules
Evidence record must include source phase, source route, role scope, proof type, storage lane, privacy class, and status.
Restricted or forbidden privacy classes must include a sensitivity reason and cannot be demo-safe by default.
Forbidden evidence must not receive a storage reference; it must move to hard_block or incident handling.
Storage references must never contain provider secrets, public URLs, signed URLs, customer private data, or raw file content.
Approval, export, deletion, and restoration must require maker-checker references once backend exists.
Redacted evidence must keep original and redacted references separate under security policy.
Customer-scoped evidence must never reveal other customer, supplier, rider, ledger, payment, or internal cost data.
The contract can be reviewed now, but database tables, migrations, upload APIs, workers, and buckets remain blocked.
Hard rules
Phase 176 is a data contract design gate only.
Do not create migrations, database tables, storage buckets, upload endpoints, download endpoints, signed URL endpoints, queues, workers, or files in this phase.
Do not copy screenshots, CNIC, wallet PIN, bank details, provider secrets, customer private data, or production credentials into the codebase.
Do not treat JSON preview as a live API response or database schema.
Next gate should design evidence storage provider boundaries before any real storage implementation.
Contract packet
{
"contractId": "evidence_data_contract_design_176",
"phase": "Phase 176",
"route": "/business-pro/evidence-data-contract-design",
"sourceGate": "evidence_storage_permission_design_gate_175",
"evidenceDesk": "role_qa_evidence_capture_desk_174",
"sourceDeskCode": "FAEDA-ROLE-QA-EVIDENCE-CAPTURE-001",
"designOnly": true,
"createsDatabase": false,
"createsStorage": false,
"createsUploadApi": false,
"createsDownloadApi": false,
"metadataFields": [
"evidenceId",
"sourcePhase",
"sourceGateCode",
"sourceRoute",
"roleScope",
"subjectType",
"subjectIdRef",
"title",
"summary",
"proofType",
"storageLane",
"privacyClass",
"sensitivityReason",
"captureMode",
"captureTimestamp",
"createdByRef",
"status",
"tags"
],
"storageReferenceFields": [
"storageProviderKey",
"bucketOrContainerRef",
"objectKeyRef",
"redactedObjectKeyRef",
"checksumSha256",
"mimeType",
"byteSize",
"dimensions",
"signedViewPolicyRef"
],
"auditFieldCount": 12,
"decisionStates": [
"draft_review",
"needs_redaction",
"restricted_hold",
"approved_internal",
"approved_demo_safe",
"rejected",
"deleted_pending_retention",
"restored_after_incident"
],
"redactionMarkers": [
"none",
"crop",
"blur",
"mask_text",
"remove_metadata",
"replace_reference",
"hard_block"
],
"candidateCount": 21,
"nextAllowedGate": "phase_177_evidence_storage_provider_boundary_design"
}Next build gate
After the data contract is clear, the next safe move is deciding provider boundaries, encryption, signed-view policy, and retention controls without storing files.