-
Notifications
You must be signed in to change notification settings - Fork 0
chore: add bill of lading v2 doc #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for tradetrust-gallery ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
WalkthroughAdds a new static JSON artifact defining a VerifiableCredential for a Bill of Lading Carrier, including context, render method, credentialSubject with shipment details and attachments, credentialStatus for transferable records, issuer/timestamps, QR code reference, and a DataIntegrityProof. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10–15 minutes Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (7)
public/static/w3c/v2_0/bill-of-lading-operative.json (7)
50-50: Use numeric type for numeric field.numberOfOriginalBL should be a number for consistent typing.
- "numberOfOriginalBL": "3", + "numberOfOriginalBL": 3,
40-40: Signatory consistency.carrierName is “Vikram Rao” but signedForCarrierText is “John Doe.” Align to a single signatory.
- "signedForCarrierText": "John Doe", + "signedForCarrierText": "Vikram Rao",Also applies to: 54-54
74-76: Excessively long filename may cause UX/header issues.Shorten the attachment filename to a realistic length.
- "filename": "veryverylongfilenameoverhereveryverylongfilenameoverhere.pdf", + "filename": "very-long-filename-sample.pdf",
2-10: Validate JSON-LD context URLs are reachable and stable.Broken contexts will break rendering/validation; verify 200 OK and correct MIME types.
I can supply a quick script to check availability if useful.
97-104: Proof values likely placeholder—confirm verifier acceptance.ecdsa-sd-2023 and proofValue appear sample-like; ensure the gallery/verifier accepts this or explicitly mark the artifact as non-verifiable demo.
56-56: Legal text clarity.“Claims must be submitted within 7 working days” is jurisdiction-specific; annotate as sample only to avoid misinterpretation.
26-37: Optional: structure packages with explicit fields.If schema allows, split weight/measurement into value+unit fields for cleaner parsing.
Example:
{ "packagesDescription": "Organic Cashew Kernels", "packagesMeasurement": { "value": 100, "unit": "Bags" }, "packagesWeight": { "value": 2.65, "unit": "MT" } }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
public/static/w3c/v2_0/bill-of-lading-operative.json(1 hunks)
🧰 Additional context used
🪛 Gitleaks (8.27.2)
public/static/w3c/v2_0/bill-of-lading-operative.json
[high] 91-91: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
[high] 92-92: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
🔇 Additional comments (5)
public/static/w3c/v2_0/bill-of-lading-operative.json (5)
83-90: Align chainId types across document and QR payload.QR payload uses chainId as a string; credentialStatus uses a number. Pick one type consistently (string is safer for URI payloads).
- "chainId": 101010 + "chainId": "101010"Double-check the viewer/parser expectations before merging.
91-92: Gitleaks flagged these values—confirm they’re non-sensitive.tokenRegistry and tokenId look like demo on a “FREE” chain, but please confirm they’re not secrets and rotation isn’t required. Add a comment noting these are public test values.
20-25: Ensure all PII is fictitious and documented as sample data.If any details are real, replace with placeholders and note that all identities/addresses are mock.
Also applies to: 48-55
81-84: Verify QR target path matches deployed URL.public maps to site root in Next.js; ensure /static/w3c/v2_0/bill-of-lading-operative.json is accessible in the deployed environment and the redirect works.
94-94: DID/web sanity check passed: issuerdid:web:trustvc.github.io:did:1resolves to https://trustvc.github.io/did/1/did.json and includes verificationMethoddid:web:trustvc.github.io:did:1#multikey-1.
| "packagesDescription": "Roasted Chickpeas (20kg packs)", | ||
| "packagesMeasurement": "60 Bundles", | ||
| "packagesWeight": "1.3" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Normalize units for packagesWeight.
Second entry lacks a unit; use the same format as the first to avoid downstream parsing issues.
- "packagesWeight": "1.3"
+ "packagesWeight": "1.3 MT"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "packagesDescription": "Roasted Chickpeas (20kg packs)", | |
| "packagesMeasurement": "60 Bundles", | |
| "packagesWeight": "1.3" | |
| } | |
| "packagesDescription": "Roasted Chickpeas (20kg packs)", | |
| "packagesMeasurement": "60 Bundles", | |
| "packagesWeight": "1.3 MT" | |
| } |
🤖 Prompt for AI Agents
In public/static/w3c/v2_0/bill-of-lading-operative.json around lines 33–36, the
packagesWeight value "1.3" is missing a unit; update this field to match the
first entry's format (include the same unit, e.g. "1.3 kg") so all
packagesWeight entries consistently include units for downstream parsing.
| "blNumber": "SGCNM21566325", | ||
| "scac": "SGPU", | ||
| "carrierName": "Vikram Rao", | ||
| "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPMAAAA7CAYAAACuTbzmAAAACXBIWXMAACE3AAAhNwEzWJ96AAAMUklEQVR4nO2dvW8byRXA31IUpWMj/gda9weKhwBptQZSpElMQ02AK8QNDkgRBKZzAZLiCFNgiiDFWcIFsJEipIpDmhCmAbeBpTYIEIr5A271H4gNI4sSN5jVW3s4nJmd/aAoiu8H0DLJ/eDu7Jt5877G8n0f5sGoZTsA4OCh+8WG11OdJua2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D1XnYCGUTX5aw/6Pbq84o6Ps+KxDVkZ0cR1SX/wN9xyZ+rvPSvOIH2KopUwLPVds28cOdGYejC4p2X2O8xzMCH6akVnlxpCxEvNmHNlOFWrULtZFCyN3KgnDDjuaGHH28LzA0fsiYYzwoSLdkT3ITtnt9rBzCFXLqhA19gKDSJp3nD2VBFXSzEsUaD6STjVw8dlSFUlG3e6oZfexzfp4LFsxyqu8DTJt7AlGkfXCtkhjAIujNq9SVYhahAtoG4UsUfxwGHEVsdlO0pK6eHzV/HobS9i8QaPne3wvXss2agr33dV1qGmrbS7NUKeB8tMPVVDPDt6zH/CeqbLdVOq9Stb2+bZILMzY6LKAcRkrs8yM4aqaac/Rm1lON9vjdzI4vnvf7SQ4j03TVi7vz0b1Oc19U7mmjKZJd5HPfJBlaZxlAIXBNVz3OuQozqVhJFqcfYZxHjQ8/kGc38ThLoGKHYBx0HHbClCQZ66RxVwnFGhXVdQSzxM5cKbNZ+5jKpzqRhxEWUEfKvgwVwwals2hnyZJF8V9Hhs09CkaIWMJGLbdFyyiynAXtt2jZRHkEBSWsK2ihJpt80i3SikK9HOZcUwCa5vHBqueVqPaOZNVINF6WcUHpsStaLHQubKiplbfRHDQCiyS6Jq4+yMaDXtZqaLoXXCEc1zgOVK3A14DXzCwgu0cFic8SaqBYYmfmfl1seFFekHQcize15M0SQyKGlzBNcaNo8ZAkLCYX2gIDu9Z4LaKeTy+ptknwzKA939aaNLK79QpqAAAAABJRU5ErkJggg==", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Avoid embedding large base64 blobs; externalize to cut repo bloat.
Move logo, signature, and attachment payloads to small files under /public (or remote), reference by URL, or replace with tiny placeholders. This keeps git history lean and speeds CI.
Example change:
- "logo": "data:image/png;base64,<~hundreds of KB~>",
+ "logo": "/static/assets/logo-sample.png",
...
- "carrierSignature": "data:image/png;base64,<~hundreds of KB~>",
+ "carrierSignature": "/static/assets/signature-sample.png"Also applies to: 55-55, 58-77
Summary
Add BOL v2 document
Summary by CodeRabbit
New Features
Documentation