feat(e2e): add harness tests - #2384
Hweinstock wants to merge 2 commits into
Conversation
|
Claude Security Review: no high-confidence findings. (run) |
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Looks good
Nice, clean addition. The PR extracts TIMEOUT_MS into a shared e2eTest/timeouts.ts, adds a HARNESS tag, and introduces e2eTest/project/harness.test.ts covering add → deploy → invoke → remove for four harness variants (managed memory default, disabled memory, semantic memory, custom system prompt). It follows the existing templates.test.ts pattern closely.
Things I checked:
--memory,--system-prompt, and--promptflags all exist onproject add harness/project invoke harness.- Transcript filtering on
kind === "text"correctly targets assistant text items (user/reasoning/notice are excluded), and theCUSTOM_PROMPT_RESPONSEsentinel doesn't collide with the"Respond now."prompt. deploy --yesreturning"Removed project ..."afterremove allis consistent withdeployedMessageinsrc/handlers/project/deploy/index.ts.- Using
mkdtempand real CLI invocations avoids the excessive-mocking pattern flagged in the review rubric. - Telemetry guidance doesn't apply here — this is test-only.
Minor observations (non-blocking, no changes required):
- The first three test cases only assert
responseText.trim() !== "", which is a weak liveness check. That's a reasonable tradeoff given LLM nondeterminism, and thecustom_promptcase does provide a stronger check. - The invoke tests run with
concurrent: trueand don't pass--session-id, so each invocation gets a fresh server-generated session. That's fine since each test targets a different harness.
Looks good to merge.
f476872 to
d214d7a
Compare
|
Claude Security Review: no high-confidence findings. (run) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor #2384 +/- ##
=========================================
Coverage 97.25% 97.25%
=========================================
Files 613 613
Lines 41028 41028
=========================================
Hits 39902 39902
Misses 1126 1126 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Problem
Add e2e harness tests.
Solution
Verification