Skip to content

Ветка выпуска 1.9.4#1633

Merged
EvilBeaver merged 19 commits intorelease/latestfrom
feature/publish-latest
Dec 16, 2025
Merged

Ветка выпуска 1.9.4#1633
EvilBeaver merged 19 commits intorelease/latestfrom
feature/publish-latest

Conversation

@EvilBeaver
Copy link
Owner

@EvilBeaver EvilBeaver commented Dec 15, 2025

Note

Refines COM interop and execution frame/locals handling, adds proper index/type errors, improves TCP read limit, makes HTTP tests auto-select host, and bumps release to 1.9.4.

  • Engine/runtime:
    • Execution frames: Refactor to return frames from PrepareReentrantMethodExecution, explicitly set/push frames; new helpers SetFrameLocals/CreateFrameLocals returning locals arrays; update local script call path to use them.
    • Dynamic args: PrepareDynamicArgs now accounts for COMWrapperContext to pass args unchanged.
    • Error handling: Add RuntimeException.InvalidIndexType; use it in PropertyNameIndexAccessor for non-string indices.
  • COM interop:
    • Argument marshalling: Wrap IVariable args with VariantWrapper and set out flags; avoid forcing Missing.Value in MarshalIValue.
    • Output params: Only write back to variables when value actually changed (unwrap VariantWrapper).
    • Value conversion: Add ContextValuesMarshaller.ConvertValueStrict<T>; ConvertToCLRObject now returns Missing.Value for NotAValidValue and respects IObjectWrapper first.
    • Property mapping: Use strict conversion in ContextPropertyMapper setters.
  • Networking:
    • TCP: ReadAllData now stops reading when length limit is reached.
  • Variables:
    • Validate indexed references on creation; make VariableReference fields readonly; expose isIndexed().
  • Tests:
    • HTTP tests now auto-select a reachable host (env OS_HTTP_TEST_HOST or fallbacks) with a pre-test hook; minor comments/notes.
  • CI:
    • Bump ReleaseNumber to 1.9.4.

Written by Cursor Bugbot for commit 04d9038. This will update automatically on new commits. Configure here.

Mr-Rm and others added 14 commits September 26, 2025 14:30
v1 fix #1590,#1429: обработка ошибки доступа по индексу при передаче параметра
v1 fix #1588: передача пропущенных параметров в COM-объекты
v1 fix #1592: проверка типов при записи свойств
к #1597: fix сравнения wrapped переменных
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 15, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/publish-latest

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.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

else
{
retValue = ContextValuesMarshaller.ConvertToCLRObject(val) ?? Missing.Value;
retValue = ContextValuesMarshaller.ConvertToCLRObject(val);
Copy link

Choose a reason for hiding this comment

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

Bug: Undefined values now pass null instead of Missing.Value to COM

The removal of ?? Missing.Value from MarshalIValue changes how Undefined values are passed to COM methods. Previously, Undefined values would be converted to Missing.Value (indicating an optional parameter should use its default), but now they're passed as null. While NotAValidValue correctly returns Missing.Value via ConvertToCLRObject, existing code that passes Undefined to skip optional COM method parameters may now fail or behave differently since null is not equivalent to a missing argument in COM interop.

Fix in Cursor Fix in Web

Copy link
Owner Author

Choose a reason for hiding this comment

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

@Mr-Rm это же by-design и так надо?

Возврат Хост;
КонецЕсли;
КонецЦикла;
КонецФункции No newline at end of file
Copy link

Choose a reason for hiding this comment

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

Bug: Missing return value when no hosts available

The function ВыбратьДоступныйХост() has no return statement when none of the candidate hosts are available. If the environment variable is not set (or unavailable) and none of the fallback hosts (localhost, httpbin.org, httpbingo.org) respond, the function exits without returning a value, resulting in Undefined. This causes мАдресРесурса to be set to Undefined, leading to confusing failures in all subsequent HTTP tests that attempt to use the host address.

Fix in Cursor Fix in Web


if (encoding.Equals(new UTF8Encoding(false)))
if (encoding.Equals(new UTF8Encoding(false)) || encoding.CodePage == 65001)
return Utf8NoBOM;
Copy link

Choose a reason for hiding this comment

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

Bug: UTF-8 with BOM may be misclassified as without BOM

The CodePage == 65001 fallback was added only to the Utf8NoBOM check (line 96), but not to the Utf8 (with BOM) check on line 93. Both UTF-8 variants share CodePage 65001. If a UTF-8 with BOM encoding has custom fallback settings causing Equals(new UTF8Encoding(true)) to fail, it will pass the CodePage == 65001 check and be incorrectly classified as Utf8NoBOM. The asymmetric application of the CodePage fallback creates potential for encoding misclassification.

Fix in Cursor Fix in Web

private T ConvertParam<T>(IValue value)
{
return ContextValuesMarshaller.ConvertParam<T>(value);
return ContextValuesMarshaller.ConvertValueStrict<T>(value);
Copy link

Choose a reason for hiding this comment

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

Bug: Undefined values now throw when setting typed properties

The change from ConvertParam<T> to ConvertValueStrict<T> introduces a breaking change for Undefined values. The old ConvertParam<T> would return default(T) when given an Undefined value (0 for int, false for bool, null for strings). The new ConvertValueStrict<T> calls ConvertToCLRObject which returns null for Undefined, but then the pattern match converted is T casted fails for null (since null is SomeType is always false in C# pattern matching), causing InvalidArgumentType to be thrown. This affects all context property setters and could break scripts that assign Undefined to typed properties.

Additional Locations (1)

Fix in Cursor Fix in Web

@EvilBeaver EvilBeaver merged commit 04d9038 into release/latest Dec 16, 2025
1 of 3 checks passed
@EvilBeaver EvilBeaver deleted the feature/publish-latest branch December 16, 2025 15:22
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