Skip to content

test: add hook ordering regression coverage#1113

Merged
psschwei merged 1 commit into
generative-computing:mainfrom
tatakaisun:test/1000-hook-order-regression
May 22, 2026
Merged

test: add hook ordering regression coverage#1113
psschwei merged 1 commit into
generative-computing:mainfrom
tatakaisun:test/1000-hook-order-regression

Conversation

@tatakaisun
Copy link
Copy Markdown
Contributor

Pull Request

Issue

Fixes #1000

Description

Add regression coverage for hook call-site ordering and payload mutation before downstream processing.

This PR also applies session_pre_init model_id mutations when constructing the backend, so the hook-mutated model_id_str is passed to the backend constructor.

Summary

  • Adds regression tests for hook call-site ordering and payload mutation handling.
  • Tests that generation_pre_call mutations are applied before backend generation.
  • Tests that session_pre_init mutations are applied before backend construction.
  • Updates start_session() to pass the hook-mutated model_id_str to the backend constructor.

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code was added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

Manual checks:

  • git diff --check passed.
  • Targeted pytest was not run locally because uv is not available on PATH.

Attribution

  • AI coding assistants used

Assisted-by: OpenAI Codex


Adding a new component, requirement, sampling strategy, or tool?

If your PR adds or modifies one of the types below, check the matching box. A checklist of type-specific review items will be posted as a comment.

  • Component
  • Requirement
  • Sampling Strategy
  • Tool

NOTE: Please ensure you have an issue that has been acknowledged by a core contributor and routed you to open a pull request against this repository. Otherwise, please open an issue before continuing with this pull request.

@tatakaisun tatakaisun requested a review from a team as a code owner May 21, 2026 13:01
Copy link
Copy Markdown
Member

@psschwei psschwei left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @tatakaisun !
Quick note: we recently added the DCO bot to this repo, and as an unfortunate consequence any PR opened before that gets blocked by it.
To kick the bot and get it to run, could you send a new commit:

git commit --amend --no-edit
git push --force-with-lease

@tatakaisun tatakaisun force-pushed the test/1000-hook-order-regression branch from 2444716 to 97fe958 Compare May 22, 2026 20:51
@tatakaisun
Copy link
Copy Markdown
Contributor Author

Thanks for the heads up! I’ll amend the commit and push an updated revision to retrigger the DCO bot.

@psschwei
Copy link
Copy Markdown
Member

looks like you're failing the linter

Add regression coverage for hook call-site ordering and payload mutation before downstream processing.

Apply session_pre_init model_id mutations when constructing the backend.

Assisted-by: OpenAI Codex
Signed-off-by: tatakaisun <tatakaisun@users.noreply.github.com>
@tatakaisun tatakaisun force-pushed the test/1000-hook-order-regression branch from 97fe958 to 90063bc Compare May 22, 2026 21:55
@tatakaisun
Copy link
Copy Markdown
Contributor Author

Thanks for the heads-up. I pushed a formatter-only update for the failing lint check. No logic changes were made.

Copy link
Copy Markdown
Member

@psschwei psschwei 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 @tatakaisun !

@psschwei psschwei added this pull request to the merge queue May 22, 2026
Merged via the queue into generative-computing:main with commit 0c03876 May 22, 2026
9 checks passed
@tatakaisun tatakaisun deleted the test/1000-hook-order-regression branch May 23, 2026 01:06
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.

test: add regression tests for hook ordering

2 participants