Skip to content

Follow-up: align v1.6 capset snapshots and clean up exec-encoding docs/comments#63

Draft
Copilot wants to merge 3 commits into
feat/exec-unicodefrom
copilot/sub-pr-62
Draft

Follow-up: align v1.6 capset snapshots and clean up exec-encoding docs/comments#63
Copilot wants to merge 3 commits into
feat/exec-unicodefrom
copilot/sub-pr-62

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 12, 2026

This follow-up addresses post-review issues from the UTF-8 transcoding / Unicode console support work. It fixes failing .NET capset snapshot tests after the protocol default/version change and resolves documentation/comment formatting gaps flagged in review.

  • .NET tests: update capset wire snapshots for protocol v1.6

    • Updated expected encoded bytes in channel capset tests to match NowProtoVersion.Current = 1.6.
  • Spec: clarify combined RAW + UNICODE behavior

    • Clarified behavior for batch and WinPS when both flags are set:
      • Agent MUST enable Unicode console mode for process startup.
      • Agent MUST NOT perform stdout/stderr transcoding.
      • Returned output is raw process output bytes; clients MUST NOT assume a specific output encoding.
    • Fixed inline-code formatting for NOW_EXEC_FLAG_PS_RAW_ENCODING.
  • Rust docs: fix malformed doc comment rendering

    • Removed literal \n sequence and corrected indentation in NowExecCapsetFlags::UNICODE_CONSOLE docs so rustdoc renders correctly.
  • C# formatting: remove accidental blank lines

    • Cleaned extra blank lines in NowProtoVersion.cs near Current.
// MsgChannel capset expected version bytes updated from 1.5 to 1.6
// before: ... 0x01, 0x00, 0x05, 0x00, ...
// after:  ... 0x01, 0x00, 0x06, 0x00, ...

Agent-Logs-Url: https://github.com/Devolutions/now-proto/sessions/b50b8124-c238-47eb-94d6-35622f46a2f1

Co-authored-by: vnikonov-devolutions <246051166+vnikonov-devolutions@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for UTF-8 transcoding and unicode console mode Follow-up: align v1.6 capset snapshots and clean up exec-encoding docs/comments May 12, 2026
@vnikonov-devolutions
Copy link
Copy Markdown
Contributor

Copilot

If both flags are set, NOW_EXEC_FLAG_BATCH_RAW_ENCODING takes precedence and the streams are passed as raw bytes (no transcoding).

This is incorrect expected behavior. If both flags are specified, server should still inject command for unicode console, but client code should not assume the stream will contain. I actually like the original suggestion:

 If both `NOW_EXEC_FLAG_BATCH_RAW_ENCODING` and `NOW_EXEC_FLAG_BATCH_UNICODE_CONSOLE` are set, the agent **MUST** apply both behaviors: it **MUST** enable the Unicode console mode for process startup, and it **MUST NOT** perform any stdout/stderr transcoding. In that case, the returned output bytes are the raw UTF-8 bytes produced by the process. The same rule applies to the analogous Windows PowerShell raw-encoding and Unicode-console flags.

Agent-Logs-Url: https://github.com/Devolutions/now-proto/sessions/b14b3d02-0117-4afd-8fbe-d2df8dd98c00

Co-authored-by: vnikonov-devolutions <246051166+vnikonov-devolutions@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 12, 2026

Copilot

If both flags are set, NOW_EXEC_FLAG_BATCH_RAW_ENCODING takes precedence and the streams are passed as raw bytes (no transcoding).
...

Updated in commit 1edb76a. I changed the spec so combined RAW_ENCODING + UNICODE_CONSOLE now requires applying both behaviors (enable Unicode console startup and skip stdout/stderr transcoding), and clarified clients must treat returned bytes as raw output without assuming a specific encoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants