Skip to content

fix: better assertion message for existing field value#1513

Merged
DenKoren merged 1 commit intomainfrom
chore/better-assertion-message
Apr 8, 2026
Merged

fix: better assertion message for existing field value#1513
DenKoren merged 1 commit intomainfrom
chore/better-assertion-message

Conversation

@DenKoren
Copy link
Copy Markdown
Member

No description provided.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 13, 2026

🦋 Changeset detected

Latest commit: 5f80d39

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@platforma-sdk/workflow-tengo Patch
@milaboratories/pl-middle-layer Patch
@milaboratories/milaboratories.monetization-test.workflow Patch
@milaboratories/milaboratories.ui-examples.workflow Patch
@milaboratories/milaboratories.pool-explorer.workflow Patch
@platforma-sdk/test Patch
@milaboratories/milaboratories.monetization-test Patch
@milaboratories/milaboratories.ui-examples Patch
@milaboratories/milaboratories.pool-explorer Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 enhances the developer experience by improving the clarity of an assertion message within the workflow-tengo SDK. The change provides more specific feedback when a field is already set, which will aid in quicker identification and resolution of related issues during development.

Highlights

  • Improved Error Messaging: The assertion message for ll.assert(!self.isSet(), ...) was updated to dynamically include the field's name, making error messages more informative and easier to debug.
  • Changelog Entry Added: A new changeset file was added to document this non-functional change, indicating a patch release for @platforma-sdk/workflow-tengo.
Changelog
  • .changeset/whole-rings-relate.md
    • Added a new changeset file to record the patch for improved assertion messaging.
  • sdk/workflow-tengo/src/smart.lib.tengo
    • Modified the set function within the field object to use a formatted string for the assertion message, including the field's name.
Activity
  • The pull request was created by DenKoren.
  • A changeset file was added to document the change.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request improves an assertion error message in smart.lib.tengo. The change correctly replaces string concatenation with a format string (%q) in an ll.assert call. This ensures that the field name is properly included in the assertion message when a field is already set, making debugging easier. The change is a good improvement.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.38%. Comparing base (06ddea8) to head (5f80d39).
⚠️ Report is 75 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1513   +/-   ##
=======================================
  Coverage   54.37%   54.38%           
=======================================
  Files         242      242           
  Lines       13686    13686           
  Branches     2820     2820           
=======================================
+ Hits         7442     7443    +1     
+ Misses       5310     5309    -1     
  Partials      934      934           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DenKoren DenKoren enabled auto-merge April 8, 2026 16:43
@DenKoren DenKoren added this pull request to the merge queue Apr 8, 2026
Merged via the queue into main with commit f0ef695 Apr 8, 2026
24 of 25 checks passed
@DenKoren DenKoren deleted the chore/better-assertion-message branch April 8, 2026 17:04
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.

2 participants