Skip to content

Phase 3 smoketest — auto-fix pipeline verification#280

Open
scszcoder wants to merge 1 commit into
sc_cloudfrom
auto-fix/phase3-smoketest-1778368210
Open

Phase 3 smoketest — auto-fix pipeline verification#280
scszcoder wants to merge 1 commit into
sc_cloudfrom
auto-fix/phase3-smoketest-1778368210

Conversation

@scszcoder
Copy link
Copy Markdown
Owner

Automated test of the Code Review Agent → branch → commit → PR flow. No code changes — adds a single marker file under agent/.cra_smoketest_*.md. Safe to close + delete branch.

scszcoder pushed a commit that referenced this pull request May 9, 2026
A direct-invoke (not AppSync-routed) Lambda field that exercises the
Phase 3 GitHub pipeline without involving the LLM. Modes:

  dryrun (default):
    1. _get_github_pat (reports found/missing + boto3 diagnostics on miss)
    2. GET /user            (auth check)
    3. GET /repos/{o}/{r}   (repo + permission check)

  pr:
    Steps 1-3 above, then stages a single harmless file
    (agent/.cra_smoketest_{epoch}.md) in /tmp/cra_smoketest_{epoch}/
    and calls _submit_fix_pr to create branch + commit + PR. Returns
    pr_url so the operator can verify the full chain end-to-end.

Diagnostics on PAT lookup failure include:
  - which env var(s) are set (without leaking values)
  - direct boto3 call to surface the real exception when GITHUB_PAT_SECRET_ARN
    is set but lookup fails (catches paste typos, wrong ARN, missing IAM,
    invalid JSON shape, etc.)

Invocation:
  aws lambda invoke --function-name skill_editor_agent \\
    --cli-binary-format raw-in-base64-out \\
    --payload '{"info":{"fieldName":"reqCodeAgentSmoketest"},
                "arguments":{"input":{"mode":"pr"}}}' \\
    /tmp/out.json && cat /tmp/out.json

Verified end-to-end: PR #280 opened on scszcoder/eCan.ai during the
initial test run (2026-05-08). Cleanup is a single 'close + delete branch'
click on the PR.

Bug fixed in same commit: the ship_ok detector previously evaluated False
on success because _submit_fix_pr's output legitimately starts with
'[1/3]'. Replaced the prefix check with '[3/3] ✅' presence + absence of
' error]' tokens.

Co-Authored-By: Claude Opus 4.7 (1M context) <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