Skip to content

test(e2e): pin pick_model_slug behavior with bash unit tests - #2619

Merged
HongmingWang-Rabbit merged 1 commit into
stagingfrom
test/synth-e2e-model-slug-coverage
May 3, 2026
Merged

HongmingWang-Rabbit merged 1 commit into
stagingfrom
test/synth-e2e-model-slug-coverage

Conversation

@HongmingWang-Rabbit

Copy link
Copy Markdown
Contributor

Summary

PR #2571 review follow-up. The runtime-aware MODEL_SLUG dispatch had only one of five branches exercised by automation (langgraph, via the synth-E2E happy path). A future regression dropping or flipping any other branch would silently revert and only surface as "Could not resolve authentication method" mid-E2E.

Change

  • Extract dispatch → `tests/e2e/lib/model_slug.sh` as sourceable `pick_model_slug()` function. No behavior change.
  • Add `tests/e2e/test_model_slug.sh` — 9 assertions across all 5 dispatch branches + override path.
  • Wire unit test into ci.yml's existing shellcheck job (only fires when `tests/e2e/` or `scripts/` change).

Test discriminators (per feedback_assert_exact_not_substring memory)

Manually regressed langgraph slash-form locally → test caught it (2 failures, exit 1). Restored → all 9 pass. The test pins behavior, not just exit-zero.

Coverage delta

Branch Before After
hermes → openai/gpt-4o none
langgraph → openai:gpt-4o E2E ✓ + E2E
claude-code → sonnet none
unknown runtime → fallback none
empty runtime → fallback none
E2E_MODEL_SLUG override (3 cases) none
empty-string override falls through none

Test plan

  • bash syntax + shellcheck (warning severity, matching CI) clean
  • all 9 assertions pass on correct code
  • all relevant assertions FAIL when any branch is regressed
  • CI shellcheck job picks up new files automatically (ci.yml unchanged `find` pattern)
  • new "Run E2E bash unit tests" CI step runs and passes

🤖 Generated with Claude Code

PR #2571 fixed synth-E2E by branching MODEL_SLUG per runtime, but only
the langgraph branch was verified at runtime — hermes / claude-code /
override / fallback had zero automated coverage. A future regression
(e.g. dropping the langgraph case) would silently revert and only
surface as "Could not resolve authentication method" mid-E2E.

This PR:
- Extracts the dispatch into tests/e2e/lib/model_slug.sh as a sourceable
  pick_model_slug() function. No behavior change.
- Adds tests/e2e/test_model_slug.sh — 9 assertions across all 5 dispatch
  branches plus the override path. Verified to FAIL when any branch is
  flipped (manually regressed langgraph slash-form to confirm the test
  catches it; restored before commit).
- Wires the unit test into ci.yml's existing shellcheck job (only runs
  when tests/e2e/ or scripts/ change). Pure-bash, no live infra.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@HongmingWang-Rabbit
HongmingWang-Rabbit added this pull request to the merge queue May 3, 2026
Merged via the queue into staging with commit 8d5e78d May 3, 2026
21 of 22 checks passed
@HongmingWang-Rabbit
HongmingWang-Rabbit deleted the test/synth-e2e-model-slug-coverage branch May 3, 2026 19:11
HongmingWang-Rabbit pushed a commit that referenced this pull request Jun 12, 2026
…context-exists-in-bp)

The new e2e-staging-workspace-requests job emits a status context the
Tier-2g lint requires to be acknowledged. It's additive (not branch-
protection-required), same as the concierge e2e job — '# bp-required:
pending #2619' (the e2e-gating umbrella tracks whether these become
required).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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