Skip to content

Conversation

@RishabhS7
Copy link
Contributor

@RishabhS7 RishabhS7 commented Sep 9, 2025

Summary

Add BOL v2 document

Summary by CodeRabbit

  • New Features

    • Introduces a fully populated Bill of Lading (Carrier) verifiable credential sample with comprehensive shipment details.
    • Includes embedded render configuration for immediate viewing.
    • Provides QR code linking to the rendered document.
    • Demonstrates on-chain transferable record status fields.
    • Showcases embedded attachments (PDF/JSON) and digital signature placeholders.
  • Documentation

    • Adds a public example credential to guide integration, rendering, and attachment handling for Bill of Lading use cases.

@netlify
Copy link

netlify bot commented Sep 9, 2025

Deploy Preview for tradetrust-gallery ready!

Name Link
🔨 Latest commit 147fb12
🔍 Latest deploy log https://app.netlify.com/projects/tradetrust-gallery/deploys/68c006908fb62b00071e0bbe
😎 Deploy Preview https://deploy-preview-22--tradetrust-gallery.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link

coderabbitai bot commented Sep 9, 2025

Walkthrough

Adds 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

Cohort / File(s) Summary
Public static credential artifact
public/static/w3c/v2_0/bill-of-lading-operative.json
Added a fully populated VerifiableCredential JSON for a Bill of Lading Carrier, including renderMethod, detailed credentialSubject fields, embedded attachments (data URLs), QR code URI, transferable record status (chain FREE, id 101010), issuer/validFrom/id, and a DataIntegrityProof.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10–15 minutes

Pre-merge checks (2 passed, 1 warning)

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The current pull request description only includes a brief summary and omits critical sections required by the repository template, specifically the Changes, Issues, and Releases headings that inform reviewers of the detailed modifications, related tickets, and release plans. Please expand the description to include a Changes section detailing the specific additions or modifications, an Issues section linking any related tickets or stories, and a Releases section indicating the target channels and ETA.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title “chore: add bill of lading v2 doc” succinctly captures the primary change of introducing the Bill of Lading version 2 document, follows the repository’s conventional commit style, and gives reviewers a clear understanding of the PR’s intent at a glance.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Poem

I thump my paws—new cargo lore!
A ledger’s tale in JSON store.
QR glints, proofs align,
Ports and voyages neatly signed.
Bytes embark, attachments sail—
Bill of Lading, carrot-mail.
Ship it, sip it—hare-itage trail! 🥕⛵️

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.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

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
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/bol-v2

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@RishabhS7 RishabhS7 merged commit d59e135 into main Sep 9, 2025
5 of 6 checks passed
@RishabhS7 RishabhS7 deleted the chore/bol-v2 branch September 9, 2025 10:53
Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 4bddb63 and 147fb12.

📒 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: issuer did:web:trustvc.github.io:did:1 resolves to https://trustvc.github.io/did/1/did.json and includes verificationMethod did:web:trustvc.github.io:did:1#multikey-1.

Comment on lines +33 to +36
"packagesDescription": "Roasted Chickpeas (20kg packs)",
"packagesMeasurement": "60 Bundles",
"packagesWeight": "1.3"
}
Copy link

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.

Suggested change
"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+8WG11OdJua2JQCoAQD7ewEAvWLD8+ZyEQSxRMxFmEctmwnjE+HjUwCoFhvehbBtBwD2xW2LDc8RPmPbVgDgBAC2uI+HrCMoNrx+phdBEEtGLuufO2rZTYkgM3YBoCls60gEOdgWjyPSEQQZ8P1JZhdAEEtK5sKMKrDpd1XNtlMj86hl2wCwo9h2CzsGglhZ5iHM25rvxFG1FOO4cbYliJVjHsJ8HuM7nXo8ZdTCOfHQdHuCWDXmIcyHmu86/Jtiw2PvzyTbDcX5NVJXHPeALNrEqjMvazYT6GfCx0fFhjcjjOhqqnNzZCaUTZVwjlp2lXNNMTrYKRDESjNPP7PNCegJjZwEMV/mJswEQdwt85gzEwSxAEiYCeKBQMJMEA+E/H24jHe//3Hts9ykupnzS5tw09vI3XQ+b/33wmBXgiCQhRvAvv+d09m0rvY3ctfwWW4CmzkfNuHmbCN345BAE4Q5C1WzX//259Urf2P/0i/Ah0ke/jfJweXEgktY27mcrOmCTwiCEJhRs8tulwVjsFRDb9Dei+Ub/umvjpy8dQ3vXn9tlMX0wS9MB5FM2D/X4PsTgLU1mxqLIMz5qGaX3a6DIZS73N4slro+aO8piwX86KtOqWBdN9fhurZuXW+tWzeQt66HmzDubVjj5vevGjMdwje/+aq0mRs3N6zxs4J1BRvB6wMUrA+waV1BwQpU7tOf/OnflAlFEIYEwlx2uyw8sq3Z5WjQ3psJxSz/8u+lnHVzsmbd7BSsMazDNa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KeTy+ptknwzKA939aaNLK79QpqAAAAABJRU5ErkJggg==",
Copy link

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

@coderabbitai coderabbitai bot mentioned this pull request Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants