Repository navigation
Conversation
The Hooks panel merged from the branch one push before its last, so a cut of changed arguments or a block reason past 64 KB still decoded with "ignore": it dropped every lone surrogate of the text (what a path that is not UTF-8 holds), not only the character the cut splits. The cut now backs up to the first byte of the character the limit splits and decodes the rest with "surrogatepass". The retention test checks, for every unit a lone surrogate included, that the kept text starts the full text and ends within 4 bytes of the limit. A trailing wait in the reporting test that could not fail is removed.
openjiuwen-release-bot Bot
pushed a commit
that referenced
this pull request
Oct 24, 2026
fix(hooks): keep a path's lone surrogates when a run log text is cut Created-by: Ox7c13 Commit-by: Jiaqi (0x7c13) Liu Merged-by: Ox7c13 Description: Paired: [GitHub #116](#116) ↔ [GitCode !83](https://gitcode.com/openJiuwen/iCode/merge_requests/83) ## Summary !81 (GitHub #111) merged the Hooks panel at `e740b102`, one push before its final head `3c2c0d33`. This MR brings in that last push, which is three files: - **`service/hooks/run_log.py`:** `_clip_text` no longer decodes the cut with `"ignore"`. That dropped every lone surrogate in a changed-arguments or block-reason text over 64 KB. A path that is not UTF-8 holds such surrogates. Now the cut only drops the character the limit splits: it backs up to that character's first byte and decodes with `"surrogatepass"`. - **`tests/service/hooks/test_run_log_retention.py`:** the cap test now checks every unit, including a lone surrogate. The kept text must start the full text and end within 4 bytes of the limit. - **`tests/orchestration/engine/test_hook_run_reporting.py`:** removes a trailing `wait_until` that could not fail. The tree is identical to `3c2c0d33`, whose CI passed in full. ## Test plan - [x] `test_changed_arguments_past_the_cap_are_cut_with_their_size_kept[lone-surrogate]` fails against `main` and passes with this change. - [x] Smart Test `--paths` on the three files: 12589 passed, 10 skipped; architecture 390 passed. - [x] `ruff check`, `ruff format --check`, and `ty check` (linux, darwin, win32). - [x] GitHub CI on this exact commit (`de64d5eb`, the closed GitHub #115): all 17 checks passed. <!-- bot4-pr-sync-meta schema_version: 1 source: gitcode gitcode_repo: openJiuwen/iCode gitcode_mr: 83 github_repo: openJiuwen-ai/iCode github_pr: 116 github_branch: sync/pr-83 --> See merge request: openJiuwen/iCode!83
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#111 was merged at
e740b102, one push before its final head3c2c0d33. This PR brings in that last push, which is three files:service/hooks/run_log.py:_clip_textno longer decodes the cut with"ignore". That dropped every lone surrogate in a changed-arguments or block-reason text over 64 KB. A path that is not UTF-8 holds such surrogates. Now the cut only drops the character the limit splits: it backs up to that character's first byte and decodes with"surrogatepass".tests/service/hooks/test_run_log_retention.py: the cap test now checks every unit, including a lone surrogate. The kept text must start the full text and end within 4 bytes of the limit.tests/orchestration/engine/test_hook_run_reporting.py: removes a trailingwait_untilthat could not fail.The tree is identical to
3c2c0d33, whose CI passed in full.Test plan
test_changed_arguments_past_the_cap_are_cut_with_their_size_kept[lone-surrogate]fails againstmainand passes with this change.--pathson the three files: 12589 passed, 10 skipped; architecture 390 passed.ruff check,ruff format --check, andty check(linux, darwin, win32).