Skip to content

test(agent): cover OAuth same-session resume - #198

Open
xz-dev wants to merge 1 commit into
tintinweb:masterfrom
xz-dev:test/oauth-session-regression
Open

test(agent): cover OAuth same-session resume#198
xz-dev wants to merge 1 commit into
tintinweb:masterfrom
xz-dev:test/oauth-session-regression

Conversation

@xz-dev

@xz-dev xz-dev commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #197.

Extend the merged #152 latest-Pi guard to prove the behavior that parent ModelRuntime forwarding protects:

  • a real parent-owned in-memory OAuth credential is refreshed once and remains stored as OAuth;
  • both child requests resolve through the parent OAuth provider without a child API-key override;
  • AgentManager.resume() reuses the exact same real child AgentSession and session ID;
  • the second provider request receives the first turn's assistant marker in its conversation.

The test remains loadable on the pinned pre-migration Pi and skips there. The existing compat-latest-pi job installs current Pi and runs this file.

Verification

Pinned Pi 0.80.6:

  • npm run lint
  • npm run typecheck
  • npm run test — 820 passed, 6 skipped
  • npm run build
  • focused file loads and skips 2 pre-migration tests

Current public Pi 0.83.0:

Live smoke with existing local authentication:

  • Pi 0.83.0-xz.124.1.g088e16f1
  • openai-codex/gpt-5.6-luna, thinking high
  • same Agent ID returned ISSUE197-LIVE-1, then resumed to return ISSUE197-LIVE-2:ISSUE197-LIVE-1
  • no global settings changed and no credential copied or printed

Independent review: C0/I0/M0.

Drive the real latest-Pi ModelRuntime, OAuth credential refresh, isolated AgentSession, and AgentManager resume path across two turns. Keep the file loadable and skipped on pre-migration Pi.

Fixes: tintinweb#197
xz-dev added a commit to xz-dev/pi-subagents-tintinweb that referenced this pull request Aug 2, 2026
xz-dev added a commit to xz-dev/pi-subagents-tintinweb that referenced this pull request Aug 4, 2026
xz-dev added a commit to xz-dev/pi-subagents-tintinweb that referenced this pull request Aug 4, 2026
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.

Test OAuth inheritance and same-session subagent resume

1 participant