Skip to content

fix(journey): compare the connect path's parameters, not the whole string - #2334

Merged
lilyshen0722 merged 1 commit into
mainfrom
sre-journey-connect-path
Oct 19, 2026
Merged

lilyshen0722 merged 1 commit into
mainfrom
sre-journey-connect-path

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

The stranger journey has failed every run since 2026-10-17 01:05Z: 11 in a row, scheduled and post-deploy, all at approve. The product was right and the check was stale.

Why. #2293 made the BYO connect path carry from=card and the card's adapter (/v2/agents/byo?pod=…&name=…&from=card&adapter=claude). approve compared the path to /v2/agents/byo?pod=…&name=… as an exact string, so it failed. Because the run stops at the first failed step, byo hasn't run since then either.

Change. approve parses the path and requires:

  • path /v2/agents/byo;
  • pod = this pod;
  • name = this seat;
  • from=card;
  • if the path carries adapter, it must equal the card's params.adapter.

Extra parameters are allowed. The step now also logs the adapter.

Checks.

  • An offline harness ran approve against 9 paths, using a stub API.
    • This branch: 9 of 9 as expected. That covers today's live path, no adapter, an extra parameter, and failures for the old path (no from), the wrong pod, name, adapter or page, and an empty path.
    • main's version: 4 mismatches. It fails the three valid paths and passes the old one.
  • A full run of this branch's script against production passed in 80.9 s. Every step passed, byo included (approve 1.06 s, adapter: claude), and cleanup returned 200/200.

The script reaches the cluster only through the chart, so the CronJob picks this up on the next Deploy Dev.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MCgCsf3UJRCPRbnNKxsECe

…ring

#2293 added from=card and the card's adapter to the BYO connect path. The
journey's approve step matched the path exactly, so every run since that
deploy failed at approve and never reached the byo step. The product was
right; the check was stale.

approve now requires /v2/agents/byo with this pod, this seat's name and
from=card, plus the card's adapter when the path carries one. Extra
parameters are allowed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MCgCsf3UJRCPRbnNKxsECe

@lilyshen0722 lilyshen0722 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Gate review @ 40da03a: PASS, with two non-blocking notes.

What I checked

  • The diff is one file, k8s/helm/commonly/files/stranger-journey.py: approve now parses connectPath instead of comparing it as a string.
  • The path it checks is built at backend/services/approvalActionService.ts:946 on main as /v2/agents/byo?pod=…&name=…&from=card plus &adapter=… when the card has one. Against that, the new check accepts every path the backend can produce today and rejects the old path that lacks from.
  • I ran my own offline check: Journey.approve with a stubbed call, both versions, 15 paths.
    • This head: the 10 cases the PR describes plus an encoded name, all as expected.
    • main: fails today's live path, the no-adapter path and the extra-parameter path, and passes the old path with no from. That is the false-red streak.
  • run_step emits the step's return value as fields, and adapter doesn't collide with step, ok, ms, budget_ms or error.
  • The commit author is Lily (noreply). The head matches the branch (ls-remote). CI is green at this head, including Test & Coverage and the kind smoke.

Notes (non-blocking; the check is still stricter than the backend needs today)

  1. The docstring and the code disagree on adapter. The docstring says the path carries "the card's adapter, if it names one"; the code only compares adapter when the path already has one. So a path that drops the card's adapter passes (probe: card adapter: claude, path without adapter → pass). The backend always appends it when the card names one, so if card_adapter or 'adapter' in query: would match the docstring and the product.
  2. The check no longer requires a relative path. urlsplit takes https://other.example/v2/agents/byo?… and //other.example/v2/agents/byo?… to path /v2/agents/byo, and both pass; the exact compare failed both. Adding not parts.scheme and not parts.netloc restores that. Also, dict(parse_qsl(…)) keeps the last of a repeated key, while the BYO page's URLSearchParams.get reads the first. Neither can happen with today's constant template, so this is coverage, not a live fault.

Either note can go in a follow-up; a new commit here needs a new gate at its head.

GATE: PASS

@lilyshen0722
lilyshen0722 added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit 03924f6 Oct 19, 2026
17 checks passed
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.

1 participant