Skip to content

fix(schema): ensure experiment_id is string in series representation#703

Merged
AlessandroPomponio merged 6 commits intomainfrom
maj_experiment_id_fix
Mar 18, 2026
Merged

fix(schema): ensure experiment_id is string in series representation#703
AlessandroPomponio merged 6 commits intomainfrom
maj_experiment_id_fix

Conversation

@michael-johnston
Copy link
Copy Markdown
Member

The experiment_id field in ValidMeasurementResult.series_representation and Entity.experiment_series was being set to the ExperimentReference instance.

This rendered as the id when outputting as CSV. However, when outputting as json it was the pydantic JSON dump.

The field properly should just be the string id c.f. entity "identifier" field. This commit makes this the case.

The experiment_id field in ValidMeasurementResult.series_representation and Entity.experiment_series was being set to the ExperimentReference instance.

This rendered as the id when outputting as CSV. However, when outputting as json it was the pydantic JSON dump.

The field properly should just be the string id c.f. entity "identifier" field. This commit makes this the case.
@DRL-NextGen
Copy link
Copy Markdown
Member

DRL-NextGen commented Mar 16, 2026

Checks Summary

Last run: 2026-03-18T10:32:24.941Z

Code Risk Analyzer vulnerability scan found 1 vulnerabilities:

Severity Identifier Package Details Fix
◻ Unknown CVE-2026-25048 xgrammar
xgrammar vulnerable to DoS via multi-layer nestingGHSA-7rgv-gqhr-fxg3

xgrammar:0.1.29->vllm:0.17.1
0.1.32

Mend Unified Agent vulnerability scan found 1 vulnerabilities:

Severity Identifier Package Details Fix
🔺 High CVE-2026-30922 pyasn1-0.6.2-py3-none-any.whl
pyasn1 is a generic ASN.1 library for Python. Prior to 0.6.3, the "pyasn1" library is vulnerable to ...pyasn1 is a generic ASN.1 library for Python. Prior to 0.6.3, the "pyasn1" library is vulnerable to a Denial of Service (DoS) attack caused by uncontrolled recursion when decoding ASN.1 data with deeply nested structures. An attacker can supply a crafted payload containing thousands of nested "SEQUENCE" ("0x30") or "SET" ("0x31") tags with "Indefinite Length" ("0x80") markers. This forces the decoder to recursively call itself until the Python interpreter crashes with a "RecursionError" or consumes all available memory (OOM), crashing the host application. This is a distinct vulnerability from CVE-2026-23490 (which addressed integer overflows in OID decoding). The fix for CVE-2026-23490 ("MAX_OID_ARC_CONTINUATION_OCTETS") does not mitigate this recursion issue. Version 0.6.3 fixes this specific issue.
Upgrade to version https://github.com/pyasn1/pyasn1.git - v0.6.3,pyasn1 - 0.6.3

@AlessandroPomponio
Copy link
Copy Markdown
Member

Doesn't str(e) work as well? I'd avoid using an fstring if possible because it's more likely for someone to end up adding a space or other whitespace inside an fstring and for that to break checks

@michael-johnston
Copy link
Copy Markdown
Member Author

Doesn't str(e) work as well? I'd avoid using an fstring if possible because it's more likely for someone to end up adding a space or other whitespace inside an fstring and for that to break checks

Sure

@michael-johnston
Copy link
Copy Markdown
Member Author

Changes made.

Copy link
Copy Markdown
Member

@AlessandroPomponio AlessandroPomponio left a comment

Choose a reason for hiding this comment

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

LGTM thanks

@AlessandroPomponio AlessandroPomponio changed the title fix(schema): ensure experiment_id is string fix(schema): ensure experiment_id is string in series representation Mar 18, 2026
@AlessandroPomponio AlessandroPomponio added this pull request to the merge queue Mar 18, 2026
@michael-johnston michael-johnston removed this pull request from the merge queue due to a manual request Mar 18, 2026
The value should only be a string.
@michael-johnston
Copy link
Copy Markdown
Member Author

@AlessandroPomponio I simplified one change.

Copy link
Copy Markdown
Member

@AlessandroPomponio AlessandroPomponio left a comment

Choose a reason for hiding this comment

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

LGTM thanks

@AlessandroPomponio AlessandroPomponio added this pull request to the merge queue Mar 18, 2026
Merged via the queue into main with commit 443e8a5 Mar 18, 2026
19 checks passed
@AlessandroPomponio AlessandroPomponio deleted the maj_experiment_id_fix branch March 18, 2026 11:06
danielelotito pushed a commit that referenced this pull request Mar 23, 2026
…703)

* fix(schema): ensure experiment_id is string

The experiment_id field in ValidMeasurementResult.series_representation and Entity.experiment_series was being set to the ExperimentReference instance.

This rendered as the id when outputting as CSV. However, when outputting as json it was the pydantic JSON dump.

The field properly should just be the string id c.f. entity "identifier" field. This commit makes this the case.

* chore(schema): using str instead of format string

* test(schema): update tests

* fix(operators): update as experiment_id no longer a references

* test(schema): further updates as experiment_id no longer an object.

* chore(operators): simplification

The value should only be a string.
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