You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: add regression guards for review fixes; harden restoreCache
FIX A (integration test — security pipeline ordering):
Replace vacuous conversational-only content with a real Anthropic API key
(matching /sk-ant-[a-zA-Z0-9_-]{30,}/) in the verbose log before a clean
docker-agent-output block. Test now asserts secrets-detected=true and
security-blocked=true, which ONLY passes under the correct order
(filter→sanitize→extract). Also asserts outputFile retains the leaked
key (Step 9b is skipped on leak detection).
FIX B (auth.test.ts — Tier 3 fallthrough is distinguishable):
Add 'falls through to author_association when org check throws (FIX 3)'.
Uses OWNER association so old hard-deny code would return denied but
new fallthrough code reaches Tier 4 and returns authorized=true,
outcome='author-association'. This test fails if the FIX 3 catch block
is reverted to return { authorized: false }.
FIX C (outputs.test.ts — blank-line inTool exit):
Add 'drops blank line that terminates an inTool block (matches awk next)'.
Checks that the line immediately before 'Clean output' is not blank,
which fails if the continue is reverted to fall-through.
FIX D (exec.test.ts — SIGTERM kill path):
Add 'kills process with SIGTERM when timeout fires'. Uses a 50ms action
timeout with a child that would naturally exit in 5s. Updated makeMockChild
so kill() emits close via setImmediate (simulates OS killing the process),
allowing the timer path to complete within the 2s test timeout.
Asserts child.kill was called with 'SIGTERM'.
FIX E (binary.ts — restoreCache non-fatal):
Wrap both restoreCache calls (docker-agent and mcp-gateway) in try/catch
with core.warning + fallthrough to download, matching the existing
saveCache non-fatal pattern. A network error in restoreCache no longer
fails the action.
Assisted-By: docker-agent
0 commit comments