Skip to content

Pull the max-prefix-len computation into its own helper and rename the matched-token argument#25728

Merged
fzyzcjy merged 1 commit into
mainfrom
tom/pr_chain/tom_refactor_202605a/primary/nonmech_scheduler/compute-max-prefix-len
May 19, 2026
Merged

Pull the max-prefix-len computation into its own helper and rename the matched-token argument#25728
fzyzcjy merged 1 commit into
mainfrom
tom/pr_chain/tom_refactor_202605a/primary/nonmech_scheduler/compute-max-prefix-len

Conversation

@fzyzcjy
Copy link
Copy Markdown
Collaborator

@fzyzcjy fzyzcjy commented May 19, 2026

In Req.init_next_round_input, the three-line max_prefix_len computation is
moved into a small helper _compute_max_prefix_len(input_len) so the
remaining body reads fill_ids[:self._compute_max_prefix_len(input_len)]
in one line. The resulting slice is then bound to a more specific name
token_ids_to_match (it is what gets passed as the prefix-match key on
the radix tree) instead of the generic token_ids.


CI States

Latest PR Test (Base): ⏳ Run #26070393056
Latest PR Test (Extra): ⚠️ Not enabled -- add run-ci-extra label to opt in.

…own helper and rename the matched-token argument

In Req.init_next_round_input, the three-line max_prefix_len computation is
moved into a small helper `_compute_max_prefix_len(input_len)` so the
remaining body reads `fill_ids[:self._compute_max_prefix_len(input_len)]`
in one line. The resulting slice is then bound to a more specific name
`token_ids_to_match` (it is what gets passed as the prefix-match key on
the radix tree) instead of the generic `token_ids`.
@fzyzcjy
Copy link
Copy Markdown
Collaborator Author

fzyzcjy commented May 19, 2026

/tag-and-rerun-ci

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@fzyzcjy fzyzcjy merged commit e4d81e4 into main May 19, 2026
84 of 108 checks passed
@fzyzcjy fzyzcjy deleted the tom/pr_chain/tom_refactor_202605a/primary/nonmech_scheduler/compute-max-prefix-len branch May 19, 2026 01:27
@fzyzcjy
Copy link
Copy Markdown
Collaborator Author

fzyzcjy commented May 19, 2026

verify-rebased: FAIL

PR head tree is NOT byte-equal to rebase(tom_refactor_202605a/primary/nonmech_scheduler onto upstream/main). Do not merge until you understand the diff.

SHA Tree
PR head (tom/pr_chain/tom_refactor_202605a/primary/nonmech_scheduler/compute-max-prefix-len) 1e5ab7e2667c 975b53b68b7ce78962a895a304528c97d098cc65
Rebased source (tag verify/rebased/20260519T013515Z) e4d81e48c913 5c448ac374ef292d8333d48b293fcdbd9a228a21

Inspect the difference:

git fetch upstream 1e5ab7e2667c7ccf3ae9059770d1fcd1f3a3fae1
git diff e4d81e48c913 1e5ab7e2667c
git diff e4d81e48c913 1e5ab7e2667c -- <path>  # per-file

Tag verify/rebased/20260519T013515Z preserved for reproduction.

Generated by single_commit_pr_chain.py verify-rebased.

@fzyzcjy
Copy link
Copy Markdown
Collaborator Author

fzyzcjy commented May 19, 2026

verify-rebased: PASS

Rebased source tree matches the current main tree (chain has been fully merged; the recorded PR head SHA is the pre-merge snapshot, now stale — that's expected and fine).

SHA Tree
Rebased source (tag verify/rebased/20260519T013859Z) c2a212bfe222 f8f47cec5a620aac42e07d0d07f9b282048ef2d3
PR head (tom/pr_chain/tom_refactor_202605a/primary/nonmech_scheduler/compute-max-prefix-len) 1e5ab7e2667c 975b53b68b7ce78962a895a304528c97d098cc65
upstream/main c2a212bfe222 f8f47cec5a620aac42e07d0d07f9b282048ef2d3

Reproduce locally (the rebase tag persists after this run):

git fetch upstream 1e5ab7e2667c7ccf3ae9059770d1fcd1f3a3fae1
REB_TREE=$(git rev-parse 'verify/rebased/20260519T013859Z^{tree}')
PR_TREE=$(git rev-parse '1e5ab7e2667c7ccf3ae9059770d1fcd1f3a3fae1^{tree}')
MAIN_TREE=$(git rev-parse 'upstream/main^{tree}')
echo "REB_TREE  = $REB_TREE"
echo "PR_TREE   = $PR_TREE"
echo "MAIN_TREE = $MAIN_TREE"

Generated by single_commit_pr_chain.py verify-rebased.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant