From 9c2521201970f1600d6a9492163783d2f43950ae Mon Sep 17 00:00:00 2001 From: Hweinstock Date: Thu, 24 Sep 2026 03:20:05 +0000 Subject: [PATCH 1/5] chore(debug): add container startup workflow --- .github/workflows/container-startup-debug.yml | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 .github/workflows/container-startup-debug.yml diff --git a/.github/workflows/container-startup-debug.yml b/.github/workflows/container-startup-debug.yml new file mode 100644 index 000000000..bbd0235c1 --- /dev/null +++ b/.github/workflows/container-startup-debug.yml @@ -0,0 +1,113 @@ +name: Container startup debug + +on: + pull_request: + branches: [refactor] + +jobs: + debug: + runs-on: ubuntu-24.04 + timeout-minutes: 25 + permissions: + contents: read + env: + AWS_ACCESS_KEY_ID: debug + AWS_SECRET_ACCESS_KEY: debug + AWS_SESSION_TOKEN: debug + AWS_REGION: us-east-1 + AWS_DEFAULT_REGION: us-east-1 + AWS_EC2_METADATA_DISABLED: "true" + AGENTCORE_TELEMETRY_DISABLED: "1" + + steps: + - uses: actions/checkout@v7 + + - uses: actions/checkout@v7 + with: + repository: Hweinstock/agentcore-cli + ref: 19ab7aa9 + path: source + + - uses: oven-sh/setup-bun@v2 + + - uses: actions/setup-node@v4 + with: + node-version: "24" + + - uses: astral-sh/setup-uv@v6 + + - working-directory: source + run: bun install --frozen-lockfile + + - working-directory: source + run: bun run build + + - name: Create one container project and start project dev + shell: bash + run: | + set -uo pipefail + + debug_root="$RUNNER_TEMP/agentcore-container-debug" + project_root="$debug_root/project-root" + mkdir -p "$project_root" + cli=(node "$GITHUB_WORKSPACE/source/dist/index.js") + + "${cli[@]}" project create \ + --name "container-debug-${GITHUB_RUN_ID}" \ + --template empty \ + --skip-git \ + --json \ + >"$debug_root/create.stdout" \ + 2>"$debug_root/create.stderr" + create_status=$? + if [ "$create_status" -ne 0 ]; then + exit "$create_status" + fi + + project_dir="$(node -e 'console.log(JSON.parse(require("fs").readFileSync(process.argv[1], "utf8")).project.path)' "$debug_root/create.stdout")" + + ( + cd "$project_dir" + "${cli[@]}" project add runtime \ + --name py_strands_container \ + --template agent-python-strands-container \ + --json + ) >"$debug_root/add.stdout" 2>"$debug_root/add.stderr" + add_status=$? + if [ "$add_status" -ne 0 ]; then + exit "$add_status" + fi + + timeout --signal=TERM --kill-after=15s 300s \ + "${cli[@]}" project dev --mode headless \ + >"$debug_root/dev.stdout" \ + 2>"$debug_root/dev.stderr" + echo "$?" >"$debug_root/dev.exit" + + - name: Collect container diagnostics + if: always() + shell: bash + run: | + set +e + debug_root="$RUNNER_TEMP/agentcore-container-debug" + + for file in create.stdout create.stderr add.stdout add.stderr dev.stdout dev.stderr dev.exit; do + echo "===== $file =====" + if [ -f "$debug_root/$file" ]; then + sed -n '1,1200p' "$debug_root/$file" + else + echo "(missing)" + fi + done + + echo "===== project spec =====" + find "$debug_root" -path '*/agentcore/agentcore.json' -print -exec sed -n '1,240p' {} \; + + echo "===== docker info =====" + docker info + + echo "===== docker ps -a =====" + docker ps -a + + echo "===== docker images =====" + docker images From bb27a46f8dd52a40d1d8de24180c443dbfdbb632 Mon Sep 17 00:00:00 2001 From: Hweinstock Date: Thu, 24 Sep 2026 03:21:13 +0000 Subject: [PATCH 2/5] fix(debug): checkout fork fix branch --- .github/workflows/container-startup-debug.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/container-startup-debug.yml b/.github/workflows/container-startup-debug.yml index bbd0235c1..5e196e46a 100644 --- a/.github/workflows/container-startup-debug.yml +++ b/.github/workflows/container-startup-debug.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v7 with: repository: Hweinstock/agentcore-cli - ref: 19ab7aa9 + ref: fix/project-dev-full-output path: source - uses: oven-sh/setup-bun@v2 From 9e6d7f8a1fcc37093fbe297dd4f8aad23847a442 Mon Sep 17 00:00:00 2001 From: Hweinstock Date: Thu, 24 Sep 2026 03:22:17 +0000 Subject: [PATCH 3/5] fix(debug): use valid project name --- .github/workflows/container-startup-debug.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/container-startup-debug.yml b/.github/workflows/container-startup-debug.yml index 5e196e46a..f45b30955 100644 --- a/.github/workflows/container-startup-debug.yml +++ b/.github/workflows/container-startup-debug.yml @@ -53,7 +53,7 @@ jobs: cli=(node "$GITHUB_WORKSPACE/source/dist/index.js") "${cli[@]}" project create \ - --name "container-debug-${GITHUB_RUN_ID}" \ + --name "ctdbg${GITHUB_RUN_ID}" \ --template empty \ --skip-git \ --json \ From d893a1487871f56eac33772a6f6dc8e72c870dae Mon Sep 17 00:00:00 2001 From: Hweinstock Date: Thu, 24 Sep 2026 03:23:23 +0000 Subject: [PATCH 4/5] fix(debug): run dev from generated project --- .github/workflows/container-startup-debug.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/container-startup-debug.yml b/.github/workflows/container-startup-debug.yml index f45b30955..7c0f1949f 100644 --- a/.github/workflows/container-startup-debug.yml +++ b/.github/workflows/container-startup-debug.yml @@ -78,10 +78,11 @@ jobs: exit "$add_status" fi - timeout --signal=TERM --kill-after=15s 300s \ - "${cli[@]}" project dev --mode headless \ - >"$debug_root/dev.stdout" \ - 2>"$debug_root/dev.stderr" + ( + cd "$project_dir" + timeout --signal=TERM --kill-after=15s 300s \ + "${cli[@]}" project dev --mode headless + ) >"$debug_root/dev.stdout" 2>"$debug_root/dev.stderr" echo "$?" >"$debug_root/dev.exit" - name: Collect container diagnostics From db336fad09d7a7e9950854b670acb2bc9904b182 Mon Sep 17 00:00:00 2001 From: Hweinstock Date: Thu, 24 Sep 2026 03:29:58 +0000 Subject: [PATCH 5/5] test(debug): reproduce multi-runtime startup --- .github/workflows/container-startup-debug.yml | 61 ++++++++++++++----- 1 file changed, 45 insertions(+), 16 deletions(-) diff --git a/.github/workflows/container-startup-debug.yml b/.github/workflows/container-startup-debug.yml index 7c0f1949f..8450e188a 100644 --- a/.github/workflows/container-startup-debug.yml +++ b/.github/workflows/container-startup-debug.yml @@ -48,8 +48,7 @@ jobs: set -uo pipefail debug_root="$RUNNER_TEMP/agentcore-container-debug" - project_root="$debug_root/project-root" - mkdir -p "$project_root" + mkdir -p "$debug_root" cli=(node "$GITHUB_WORKSPACE/source/dist/index.js") "${cli[@]}" project create \ @@ -66,24 +65,47 @@ jobs: project_dir="$(node -e 'console.log(JSON.parse(require("fs").readFileSync(process.argv[1], "utf8")).project.path)' "$debug_root/create.stdout")" - ( - cd "$project_dir" - "${cli[@]}" project add runtime \ - --name py_strands_container \ - --template agent-python-strands-container \ - --json - ) >"$debug_root/add.stdout" 2>"$debug_root/add.stderr" - add_status=$? - if [ "$add_status" -ne 0 ]; then - exit "$add_status" - fi + runtime_specs=( + "agent_python_minimal|agent-python-minimal" + "agent_python_strands|agent-python-strands" + "py_strands_container|agent-python-strands-container" + "agent_python_langchain|agent-python-langchain" + "agent_ts_strands|agent-typescript-strands" + "agent_ts_vercel|agent-typescript-vercel" + "mcp_python_fastmcp|mcp-python-fastmcp" + "a2a_python_strands|a2a-python-strands" + "agui_python_strands|agui-python-strands" + ) + + : >"$debug_root/timing" + for spec in "${runtime_specs[@]}"; do + IFS="|" read -r runtime_name runtime_template <<<"$spec" + echo "$(date --iso-8601=seconds) add $runtime_name" >>"$debug_root/timing" + ( + cd "$project_dir" + "${cli[@]}" project add runtime \ + --name "$runtime_name" \ + --template "$runtime_template" \ + --json + ) >"$debug_root/add-$runtime_name.stdout" 2>"$debug_root/add-$runtime_name.stderr" + add_status=$? + echo "$(date --iso-8601=seconds) add $runtime_name exit=$add_status" >>"$debug_root/timing" + if [ "$add_status" -ne 0 ]; then + exit "$add_status" + fi + done + echo "$(date --iso-8601=seconds) project-dev start" >>"$debug_root/timing" + set +e ( cd "$project_dir" - timeout --signal=TERM --kill-after=15s 300s \ + timeout --signal=TERM --kill-after=20s 360s \ "${cli[@]}" project dev --mode headless ) >"$debug_root/dev.stdout" 2>"$debug_root/dev.stderr" - echo "$?" >"$debug_root/dev.exit" + dev_status=$? + echo "$(date --iso-8601=seconds) project-dev exit=$dev_status" >>"$debug_root/timing" + echo "$dev_status" >"$debug_root/dev.exit" + exit "$dev_status" - name: Collect container diagnostics if: always() @@ -92,7 +114,7 @@ jobs: set +e debug_root="$RUNNER_TEMP/agentcore-container-debug" - for file in create.stdout create.stderr add.stdout add.stderr dev.stdout dev.stderr dev.exit; do + for file in timing create.stdout create.stderr dev.stdout dev.stderr dev.exit; do echo "===== $file =====" if [ -f "$debug_root/$file" ]; then sed -n '1,1200p' "$debug_root/$file" @@ -101,6 +123,13 @@ jobs: fi done + for file in "$debug_root"/add-*.stdout "$debug_root"/add-*.stderr; do + echo "===== ${file##*/} =====" + if [ -f "$file" ]; then + sed -n '1,80p' "$file" + fi + done + echo "===== project spec =====" find "$debug_root" -path '*/agentcore/agentcore.json' -print -exec sed -n '1,240p' {} \;