[codex] cover commercialization ownership gaps#4
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly strengthens the commercialization workflow by introducing mandatory on-chain ownership verification for all assets. It addresses potential regressions where confusing commercialization failures could occur due to incomplete ownership checks or incorrect license template metadata. The changes ensure that only true asset owners can commercialize, providing clearer diagnostics for unauthorized attempts and maintaining data integrity for license templates. Additionally, the robustness of workflow readback mechanisms has been improved to better handle transient errors. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request enhances several workflow processes by introducing robust error handling and ownership verification. The register-voice-asset workflow now includes fetching and returning a tokenId, with waitForWorkflowReadback updated to surface transient read errors more effectively. Similarly, the create-dataset-and-list-for-sale workflow now performs a critical pre-check to ensure the acting account is the current owner of all assets, throwing a 409 Conflict error with detailed diagnostics if an ownership mismatch occurs. The license-template workflow was updated to include createdAt and updatedAt timestamps in the default template creation, and the register-whisper-block workflow's waitForWorkflowEventQuery was improved to handle transient event query errors and normalize event log results.
Summary
This branch tightened the commercialization workflow around an ownership check that now blocks packaging when the acting account is not the current on-chain owner of every source asset. Without focused tests, the new branch could silently regress in two places that matter to users: the early failure path could lose the authorized-but-not-owner diagnostics that explain why commercialization is blocked, and the default license-template creation payload could drift away from the new creator and timestamp fields required by the updated workflow.
The user-visible effect of those regressions would be confusing commercialization failures. A collaborator who still has authorization but no longer owns the asset would see a generic ownership conflict with missing context, and template auto-creation could stop reflecting the current creator metadata even though the write still appears to succeed. Both cases are narrow, but they sit directly on the changed workflow path and are the kind of gaps that are easy to miss when only the happy path is covered.
The root cause was incomplete test setup around the new preflight owner reads and missing assertions for the expanded template payload. I updated the dataset commercialization tests to account for the owner precheck, added a focused failure test for the plain ownership mismatch, added a second focused failure test that proves the workflow captures the authorized-but-not-owner diagnostics, and fixed the stale dataset-id timeout test so it exercises the intended branch again. I also pinned
Date.now()in the license-template test and asserted the exactcreateTemplatepayload so the newcreator,createdAt, andupdatedAtfields are now covered.Validation
I ran:
pnpm vitest run packages/api/src/workflows/create-dataset-and-list-for-sale.test.ts packages/api/src/workflows/license-template.test.ts packages/api/src/workflows/commercialize-voice-asset.test.ts packages/api/src/workflows/rights-aware-commercialize-voice-asset.test.tsThose targeted workflow suites all pass on this branch.