diff --git a/.gitignore b/.gitignore index dad73ecbb..94e3db919 100644 --- a/.gitignore +++ b/.gitignore @@ -85,10 +85,8 @@ secrets.json # Artifacts that should never be tracked *.zip -# ...except the public proof bundles the frontend serves. These are -# intentionally tracked fixtures (the audit-bundle pair backs the public -# /api/v1/proof/verify demo, including the deliberately tampered one), and -# the bare *.zip rule above was silently covering them (#2873). +# ...except any public bundles the frontend serves from these folders (#2873). +# None are published at the moment. !frontend/public/proof/*.zip login_resp.json frontend/build_log.txt diff --git a/frontend/public/proof/audit-bundle-tampered.zip b/frontend/public/proof/audit-bundle-tampered.zip deleted file mode 100644 index 50e02e82f..000000000 Binary files a/frontend/public/proof/audit-bundle-tampered.zip and /dev/null differ diff --git a/frontend/public/proof/audit-bundle.zip b/frontend/public/proof/audit-bundle.zip deleted file mode 100644 index 062a233a6..000000000 Binary files a/frontend/public/proof/audit-bundle.zip and /dev/null differ diff --git a/frontend/public/proof/epcis-sample.jsonld b/frontend/public/proof/epcis-sample.jsonld deleted file mode 100644 index c107be48a..000000000 --- a/frontend/public/proof/epcis-sample.jsonld +++ /dev/null @@ -1,88 +0,0 @@ -{ - "_comment": "SYNTHETIC — Sample EPCIS 2.0 JSON-LD payload for the RegEngine /proof page. Three Critical Tracking Events covering harvesting, initial packing, and shipping for a single lot of romaine lettuce. Modeled on services/ingestion/app/epcis/. Not a real grower, lot, or shipment.", - "@context": [ - "https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld", - { - "fsma": "urn:fsma:traceability:" - } - ], - "type": "EPCISDocument", - "schemaVersion": "2.0", - "creationDate": "2026-02-08T17:00:10Z", - "epcisBody": { - "eventList": [ - { - "type": "ObjectEvent", - "eventTime": "2026-02-05T13:42:00Z", - "eventTimeZoneOffset": "-08:00", - "epcList": [ - "urn:epc:id:sgtin:0614141.107346.SV-20240115-001" - ], - "action": "ADD", - "bizStep": "urn:fsma:traceability:harvesting", - "disposition": "urn:epcglobal:cbv:disp:active", - "readPoint": { - "id": "urn:epc:id:sgln:0614141.00001.0" - }, - "bizLocation": { - "id": "urn:epc:id:sgln:0614141.00001.0" - }, - "fsma:traceabilityLotCode": "SV-20240115-001", - "fsma:foodCommodity": "Romaine Lettuce, fresh-cut", - "fsma:harvestDate": "2026-02-05", - "fsma:growingArea": "Field 7B, Salinas Valley, CA" - }, - { - "type": "ObjectEvent", - "eventTime": "2026-02-06T08:15:00Z", - "eventTimeZoneOffset": "-08:00", - "epcList": [ - "urn:epc:id:sgtin:0614141.107346.SV-20240115-001" - ], - "action": "OBSERVE", - "bizStep": "urn:fsma:traceability:initial_packing", - "disposition": "urn:epcglobal:cbv:disp:in_progress", - "readPoint": { - "id": "urn:epc:id:sgln:0614141.00002.0" - }, - "bizLocation": { - "id": "urn:epc:id:sgln:0614141.00002.0" - }, - "fsma:traceabilityLotCode": "SV-20240115-001", - "fsma:packDate": "2026-02-06", - "fsma:packingFacility": "Salinas Valley Cooling & Pack, Salinas, CA", - "fsma:quantity": { - "value": 480, - "uom": "case" - } - }, - { - "type": "ObjectEvent", - "eventTime": "2026-02-07T05:30:00Z", - "eventTimeZoneOffset": "-08:00", - "epcList": [ - "urn:epc:id:sgtin:0614141.107346.SV-20240115-001" - ], - "action": "OBSERVE", - "bizStep": "urn:fsma:traceability:shipping", - "disposition": "urn:epcglobal:cbv:disp:in_transit", - "readPoint": { - "id": "urn:epc:id:sgln:0614141.00002.0" - }, - "bizLocation": { - "id": "urn:epc:id:sgln:0614141.00002.0" - }, - "destinationList": [ - { - "type": "urn:epcglobal:cbv:sdt:location", - "destination": "urn:epc:id:sgln:0614141.00099.0" - } - ], - "fsma:traceabilityLotCode": "SV-20240115-001", - "fsma:shipDate": "2026-02-07", - "fsma:shipToEntity": "DC-099, Tracy, CA", - "fsma:carrier": "Reefer Logistics Inc." - } - ] - } -} diff --git a/frontend/public/proof/fsma-204-sample.csv b/frontend/public/proof/fsma-204-sample.csv deleted file mode 100644 index daa15cd42..000000000 --- a/frontend/public/proof/fsma-204-sample.csv +++ /dev/null @@ -1,11 +0,0 @@ -Traceability Lot Code (TLC),Product Description,Quantity,Unit of Measure,Event Type,Event Date,Event Time,Facility Name,Facility GLN,Facility Address,Confidence Score -SV-20240115-001,Romaine Lettuce,500,cases,SHIPPING,2024-01-15,14:00:00,Sunny Valley Farms,1234567890128,"123 Farm Road, Salinas CA",0.98 -SV-20240115-001,Romaine Lettuce,500,cases,RECEIVING,2024-01-16,08:00:00,Fresh Cut Co,2345678901234,"456 Processing Lane, Fresno CA",0.97 -FC-20240116-A,Chopped Romaine,250,cases,TRANSFORMATION,2024-01-16,10:00:00,Fresh Cut Co,2345678901234,"456 Processing Lane, Fresno CA",0.95 -FC-20240116-B,Romaine Hearts,250,cases,TRANSFORMATION,2024-01-16,11:00:00,Fresh Cut Co,2345678901234,"456 Processing Lane, Fresno CA",0.95 -FC-20240116-A,Chopped Romaine,100,cases,SHIPPING,2024-01-17,06:00:00,Fresh Cut Co,2345678901234,"456 Processing Lane, Fresno CA",0.96 -FC-20240116-A,Chopped Romaine,100,cases,RECEIVING,2024-01-17,10:00:00,Metro Foods,3456789012340,"789 Distribution Dr, Oakland CA",0.94 -FC-20240116-B,Romaine Hearts,150,cases,SHIPPING,2024-01-17,07:00:00,Fresh Cut Co,2345678901234,"456 Processing Lane, Fresno CA",0.96 -FC-20240116-B,Romaine Hearts,150,cases,RECEIVING,2024-01-17,11:00:00,Valley Wholesale,4567890123456,"321 Wholesale Ave, Stockton CA",0.93 -FC-20240116-A,Chopped Romaine,50,cases,SHIPPING,2024-01-18,05:00:00,Metro Foods,3456789012340,"789 Distribution Dr, Oakland CA",0.95 -FC-20240116-A,Chopped Romaine,50,cases,RECEIVING,2024-01-18,08:00:00,SuperMart #42,5678901234562,"100 Retail St, San Jose CA",0.92 diff --git a/frontend/public/sdk/verify_chain.py b/frontend/public/sdk/verify_chain.py index 48bbf2ad7..5daf64d6c 100644 --- a/frontend/public/sdk/verify_chain.py +++ b/frontend/public/sdk/verify_chain.py @@ -17,7 +17,7 @@ odd-node padding: duplicate the last node Usage: - python verify_chain.py audit-bundle.zip + python verify_chain.py your-bundle.zip Copyright (c) 2024-2026 RegEngine LLC License: Apache License 2.0 (https://www.apache.org/licenses/LICENSE-2.0) — @@ -260,7 +260,7 @@ def verify_bundle(zip_path: str) -> int: def main() -> int: parser = argparse.ArgumentParser(description="Verify a RegEngine audit bundle (zip with manifest.json).") - parser.add_argument("bundle", help="Path to audit-bundle.zip") + parser.add_argument("bundle", help="Path to an exported audit bundle ZIP") args = parser.parse_args() return verify_bundle(args.bundle) diff --git a/frontend/src/__tests__/pages/proof-no-sample.test.tsx b/frontend/src/__tests__/pages/proof-no-sample.test.tsx new file mode 100644 index 000000000..93d36fa3a --- /dev/null +++ b/frontend/src/__tests__/pages/proof-no-sample.test.tsx @@ -0,0 +1,19 @@ +import { render, screen } from '@testing-library/react'; +import { describe, expect, it } from 'vitest'; +import ProofPage from '@/app/proof/page'; + +// /proof must not offer synthetic downloads or made-up hashes and sizes. +describe('/proof without sample data', () => { + it('shows an empty state and no artifact downloads', () => { + const { container } = render(); + const text = container.textContent ?? ''; + + expect(screen.getByText(/no public artifacts are published yet/i)).toBeInTheDocument(); + expect(text).not.toMatch(/fsma-204-sample|epcis-sample|audit-bundle/i); + expect(text).not.toMatch(/\b[0-9a-f]{12,}\b/i); + expect(container.querySelector('a[download]:not([href="/sdk/verify_chain.py"])')).toBeNull(); + expect(container.querySelector('a[href="/sdk/verify_chain.py"][download]')).not.toBeNull(); + expect(container.querySelector('a[href^="/proof/"]')).toBeNull(); + expect(container.querySelector('a[href="/verify"]')).not.toBeNull(); + }); +}); diff --git a/frontend/src/app/docs/page.tsx b/frontend/src/app/docs/page.tsx index 89c851785..861cb3955 100644 --- a/frontend/src/app/docs/page.tsx +++ b/frontend/src/app/docs/page.tsx @@ -305,7 +305,7 @@ export default function DocsHomePage() {