Skip to content

Instantly share code, notes, and snippets.

@jwmatthews
Last active May 19, 2026 14:24
Show Gist options
  • Select an option

  • Save jwmatthews/9481fde6edae811e2462996c026ea991 to your computer and use it in GitHub Desktop.

Select an option

Save jwmatthews/9481fde6edae811e2462996c026ea991 to your computer and use it in GitHub Desktop.

Overview

Testing PR konveyor-ecosystem/semver-analyzer#21

PreReq - unbuffer needs to be installed

$ time ./run.sh --migrate ./quipucords-ui --base-branch original_2.1.0 --non-interactive
[ERROR] Required command not found: unbuffer

[ERROR] Script failed with exit code 1 (0s)
[ERROR] Check logs in /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/logs/20260518T210546/ for details
./run.sh --migrate ./quipucords-ui --base-branch original_2.1.0   0.01s user 0.02s system 74% cpu 0.035 total
[jmatthews@mbp2024] in ~/synced/hack_semver/example_runs/2026_05_18/patternfly-tools (main) $ brew install expect
✔︎ JSON API formula.jws.json                                                                              Downloaded   32.5MB/ 32.5MB
✔︎ JSON API cask.jws.json                                                                                 Downloaded   15.7MB/ 15.7MB
Inspect the formula dependency plan before installing with `brew install --ask`.
Enable ask mode by setting `HOMEBREW_ASK=1`.
Hide these hints with `HOMEBREW_NO_ENV_HINTS=1` (see `man brew`).
==> Fetching downloads for: expect
✔︎ Bottle Manifest expect (5.45.4_3)                                                                      Downloaded   20.0KB/ 20.0KB
✔︎ Bottle Manifest tcl-tk@8 (8.6.18)                                                                      Downloaded   13.7KB/ 13.7KB
✔︎ Bottle Manifest ca-certificates (2026-05-14)                                                           Downloaded    1.7KB/  1.7KB
✔︎ Bottle Manifest openssl@3 (3.6.2)                                                                      Downloaded   12.0KB/ 12.0KB
✔︎ Bottle ca-certificates (2026-05-14)                                                                    Downloaded  112.1KB/112.1KB
✔︎ Bottle expect (5.45.4_3)                                                                               Downloaded  269.3KB/269.3KB
✔︎ Bottle tcl-tk@8 (8.6.18)                                                                               Downloaded    8.9MB/  8.9MB
✔︎ Bottle openssl@3 (3.6.2)                                                                               Downloaded   10.9MB/ 10.9MB
==> Installing expect dependency: tcl-tk@8
==> Installing tcl-tk@8 dependency: openssl@3
==> Pouring openssl@3--3.6.2.arm64_sequoia.bottle.tar.gz
🍺  /opt/homebrew/Cellar/openssl@3/3.6.2: 7,627 files, 37.7MB
==> Pouring tcl-tk@8--8.6.18.arm64_sequoia.bottle.tar.gz
🍺  /opt/homebrew/Cellar/tcl-tk@8/8.6.18: 3,072 files, 37.6MB
==> Pouring expect--5.45.4_3.arm64_sequoia.bottle.tar.gz
🍺  /opt/homebrew/Cellar/expect/5.45.4_3: 71 files, 830.4KB
==> Running `brew cleanup expect`...
Disable this behaviour by setting `HOMEBREW_NO_INSTALL_CLEANUP=1`.
Hide these hints with `HOMEBREW_NO_ENV_HINTS=1` (see `man brew`).

Building Zip File

export SEMVER_REPO_BRANCH=feat/addBuildScripts
export SEMVER_REPO_URL=https://github.com/pranavgaikwad/semver-analyzer.git
./build.sh

Testing Zip File

# Need "unbuffer"
brew install expect

git@github.com:jwmatthews/quipucords-ui.git
cd quipucords-ui
git checkout original_2.1.0

[jmatthews@mbp2024] in ~/synced/hack_semver/example_runs/2026_05_18/patternfly-tools (main) $ time ./run.sh --migrate ./quipucords-ui --base-branch original_2.1.0 --non-interactive
[INFO]  Using pre-packaged rules
[INFO]  Base branch: original_2.1.0
[INFO]  Creating migration branch: semver/goose/051826-2106
Switched to branch 'original_2.1.0'
Your branch is up to date with 'origin/original_2.1.0'.
Switched to a new branch 'semver/goose/051826-2106'
[INFO]  Project:   /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/quipucords-ui
[INFO]  Branch:    semver/goose/051826-2106
[INFO]  Rules:     /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/rules
[INFO]  Agent:     goose
[INFO]  Temp dir:  /var/folders/4c/970lt3wx2kj653cfmt7xxrpc0000gn/T//pf-migrate.5F8HyG

[STEP 1/8] Generating provider settings

[STEP 2/8] Starting frontend-analyzer-provider
[INFO]  Running '/Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/bin/frontend-analyzer-provider serve -p 9002'
[INFO]  frontend-analyzer-provider started (PID 89622, port 9002)

[STEP 3/8] Running kantra analysis
[INFO]  Running '/Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/.kantra/kantra analyze --input /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/quipucords-ui --output /var/folders/4c/970lt3wx2kj653cfmt7xxrpc0000gn/T//pf-migrate.5F8HyG/kantra --rules /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/rules --override-provider-settings /var/folders/4c/970lt3wx2kj653cfmt7xxrpc0000gn/T//pf-migrate.5F8HyG/provider_settings.json --enable-default-rulesets=false --run-local --overwrite'
[INFO]  Follow logs: tail -f /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/logs/20260518T210604/kantra.log
[INFO]  Kantra analysis complete (0m08s)

[STEP 4/8] Stopping frontend-analyzer-provider
[INFO]  frontend-analyzer-provider stopped

[STEP 5/8] Converting kantra output to JSON
[INFO]  Converted: /var/folders/4c/970lt3wx2kj653cfmt7xxrpc0000gn/T//pf-migrate.5F8HyG/kantra/output.json

[STEP 6/8] Applying pattern-based fixes
[INFO]  Running 'unbuffer /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/bin/fix-engine-cli fix /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/quipucords-ui --input /var/folders/4c/970lt3wx2kj653cfmt7xxrpc0000gn/T//pf-migrate.5F8HyG/kantra/output.json --log-dir /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/logs/20260518T210604/fix-debug --strategies /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/rules/topology/fix-guidance/fix-strategies.json --strategies /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/rules/patternfly/fix-guidance/fix-strategies.json --strategies /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/rules/rcg/fix-guidance/fix-strategies.json --strategies /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/rules/sdk/fix-guidance/fix-strategies.json --strategies /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/rules/react-types/fix-guidance/fix-strategies.json --strategies /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/rules/react/fix-guidance/fix-strategies.json'
[INFO]  Follow logs: tail -f /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/logs/20260518T210604/fix-pattern.log
[INFO]  Pattern-based fixes complete (0m01s)

[STEP 7/8] Applying LLM-based fixes
[INFO]  Running 'unbuffer /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/bin/fix-engine-cli fix /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/quipucords-ui --input /var/folders/4c/970lt3wx2kj653cfmt7xxrpc0000gn/T//pf-migrate.5F8HyG/kantra/output.json --llm-provider goose --goose-timeout 300 --log-dir /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/logs/20260518T210604/fix-debug --strategies /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/rules/topology/fix-guidance/fix-strategies.json --strategies /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/rules/patternfly/fix-guidance/fix-strategies.json --strategies /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/rules/rcg/fix-guidance/fix-strategies.json --strategies /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/rules/sdk/fix-guidance/fix-strategies.json --strategies /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/rules/react-types/fix-guidance/fix-strategies.json --strategies /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/rules/react/fix-guidance/fix-strategies.json'
[INFO]  Follow logs: tail -f /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/logs/20260518T210604/fix-llm.log
[INFO]  LLM-based fixes complete (44m19s)
[INFO]  Committed automated fixes

[STEP 8/8] Running goose for remaining fixes
[INFO]  Running 'env GOOSE_MODE=auto goose run -i /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/prompt.md'
[INFO]  Follow logs: tail -f /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/logs/20260518T210604/agent-goose.log
[INFO]  Goose agent complete (13m50s)
[INFO]  Committed AI agent fixes
[INFO]  Stats written to: /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/quipucords-ui/.pf-migration/stats.json

[INFO]  Migration complete!
[INFO]  Project: /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/quipucords-ui
[INFO]  Kantra output: /var/folders/4c/970lt3wx2kj653cfmt7xxrpc0000gn/T//pf-migrate.5F8HyG/kantra/
[INFO]  Logs: /Users/jmatthews/synced/hack_semver/example_runs/2026_05_18/patternfly-tools/logs/20260518T210604/
[INFO]  Total runtime: 58m19s
./run.sh --migrate ./quipucords-ui --base-branch original_2.1.0   341.05s user 127.45s system 13% cpu 58:19.29 tota



Building Container

$ cat build_container.sh
podman build -f Containerfile \
    -t semver-analyzer:dev \
    --build-arg SEMVER_REPO=https://github.com/pranavgaikwad/semver-analyzer.git  \
    --build-arg SEMVER_BRANCH=feat/addBuildScripts
    
    
[10/10] STEP 34/36: VOLUME ["/workspace"]
--> ad7831a8baa9
[10/10] STEP 35/36: ENTRYPOINT ["/opt/patternfly-tools/run.sh"]
--> 476d2a0974d3
[10/10] STEP 36/36: CMD ["--help"]
[10/10] COMMIT semver-analyzer:dev
--> b98445704703
Successfully tagged localhost/semver-analyzer:dev
b9844570470331be10ec165dee387af3c28035038b1deb4d6559744d5e0d2b45
./build_container.sh  0.23s user 0.22s system 0% cpu 19:50.64 total

Testing the Container

$ cat test_kickoff.sh
IMAGE=semver-analyzer:dev
export GCP_PROJECT_ID="$ANTHROPIC_VERTEX_PROJECT_ID"
export GCP_LOCATION="$CLOUD_ML_REGION"


time ./run_container.sh --migrate quipucords-ui --base-branch original_2.1.0 --image ${IMAGE} --enable-eval --non-interactive 2>&1 | tee run_container_semver_from_$(date +%Y%m%d).log


$ ./test_kickoff.sh
[INFO]  Container runtime: podman
[INFO]  Mode: mount
[INFO]  Image: semver-analyzer:dev
[INFO]  App: /Users/jmatthews/synced/semver_example_runs/2026_05_19_a_container/quipucords-ui
[INFO]  Goose config: using default (baked into image)
[INFO]  GCP credentials: /Users/jmatthews/.config/gcloud
[INFO]  Memory: enabled (mempalace-data volume)
[INFO]  Mounting /Users/jmatthews/synced/semver_example_runs/2026_05_19_a_container/quipucords-ui at /workspace
[INFO]  Container: e4820daafe64a06a1aab95b07aa0f7c19603775554e83f29144af89eb4eb3784
  Skipping corpus-origin detection — no readable samples.

  Scanning for entities in: /root/.mempalace
  No entities detected — proceeding with directory-based rooms.

=======================================================
  MemPalace Init — Local setup
=======================================================

  WING: .mempalace
  (0 files found, rooms detected from filename patterns)

    ROOM: general
          All project files

───────────────────────────────────────────────────────

  Config saved: /root/.mempalace/mempalace.yaml

  Next step:
    mempalace mine /root/.mempalace

=======================================================

  ~1 files (~<1 MB) would be mined into this palace.

  Mine this directory now? [Y/n]
  Skipped. Run `mempalace mine /root/.mempalace` when ready.
[INFO]  Using pre-packaged rules
[INFO]  Base branch: original_2.1.0
[INFO]  Creating migration branch: semver/goose/051926-1418
Already on 'original_2.1.0'
Your branch is up to date with 'origin/original_2.1.0'.
Switched to a new branch 'semver/goose/051926-1418'
[INFO]  Project:   /workspace
[INFO]  Branch:    semver/goose/051926-1418
[INFO]  Rules:     /opt/patternfly-tools/rules
[INFO]  Agent:     goose
[INFO]  Temp dir:  /tmp/pf-migrate.QjHc4c

[STEP 1/8] Generating provider settings

[STEP 2/8] Starting frontend-analyzer-provider
[INFO]  Running '/opt/patternfly-tools/bin/frontend-analyzer-provider serve -p 9002'
[INFO]  frontend-analyzer-provider started (PID 26, port 9002)

[STEP 3/8] Running kantra analysis
[INFO]  Running '/opt/patternfly-tools/.kantra/kantra analyze --input /workspace --output /tmp/pf-migrate.QjHc4c/kantra --rules /opt/patternfly-tools/rules --override-provider-settings /tmp/pf-migrate.QjHc4c/provider_settings.json --enable-default-rulesets=false --run-local --overwrite'
[INFO]  Follow logs: tail -f /opt/patternfly-tools/logs/20260519T141820/kantra.log
[INFO]  Kantra analysis complete (2m05s)

[STEP 4/8] Stopping frontend-analyzer-provider
[INFO]  frontend-analyzer-provider stopped

[STEP 5/8] Converting kantra output to JSON
[INFO]  Converted: /tmp/pf-migrate.QjHc4c/kantra/output.json

[STEP 6/8] Applying pattern-based fixes
[INFO]  Running 'unbuffer /opt/patternfly-tools/bin/fix-engine-cli fix /workspace --input /tmp/pf-migrate.QjHc4c/kantra/output.json --log-dir /opt/patternfly-tools/logs/20260519T141820/fix-debug'
[INFO]  Follow logs: tail -f /opt/patternfly-tools/logs/20260519T141820/fix-pattern.log
[INFO]  Pattern-based fixes complete (0m01s)

[STEP 7/8] Applying LLM-based fixes
[INFO]  Running 'unbuffer /opt/patternfly-tools/bin/fix-engine-cli fix /workspace --input /tmp/pf-migrate.QjHc4c/kantra/output.json --llm-provider goose --goose-timeout 300 --log-dir /opt/patternfly-tools/logs/20260519T141820/fix-debug'
[INFO]  Follow logs: tail -f /opt/patternfly-tools/logs/20260519T141820/fix-llm.log
[INFO]  LLM-based fixes complete (0m52s)
[INFO]  Committed automated fixes

[STEP 8/8] Running goose for remaining fixes
[INFO]  Running 'env GOOSE_MODE=auto goose run -i /opt/patternfly-tools/prompt.md'
[INFO]  Follow logs: tail -f /opt/patternfly-tools/logs/20260519T141820/agent-goose.log
[INFO]  Goose agent complete (0m01s)
[WARN]  goose exited with non-zero status. Check /opt/patternfly-tools/logs/20260519T141820/agent-goose.log
[INFO]  Committed AI agent fixes
[INFO]  Stats written to: /workspace/.pf-migration/stats.json

[INFO]  Migration complete!
[INFO]  Project: /workspace
[INFO]  Kantra output: /tmp/pf-migrate.QjHc4c/kantra/
[INFO]  Logs: /opt/patternfly-tools/logs/20260519T141820/
[INFO]  Total runtime: 3m4s
[INFO]  Results in: /Users/jmatthews/synced/semver_example_runs/2026_05_19_a_container/quipucords-ui
[INFO]  Logs in: /Users/jmatthews/synced/semver_example_runs/2026_05_19_a_container/.pf-migration-logs/
[INFO]  Running evaluation for branch: semver/goose/051926-1418
[INFO]  Eval container: 552c33402104361877f6390f7a03ccbe7bcc4e253ed69b29bee62f2fb145a5c7
[INFO]  Project:    /workspace
[INFO]  Base:       original_2.1.0
[INFO]  Branch:     semver/goose/051926-1418
[INFO]  Agent:      goose
[INFO]  Logs:       /opt/patternfly-tools/logs/20260519T142125/

[STEP 1/3] Running pf-codemods
[INFO]  Creating pf-codemods branch: pf-codemods-051926-1421
Switched to branch 'original_2.1.0'
Your branch is up to date with 'origin/original_2.1.0'.
Switched to a new branch 'pf-codemods-051926-1421'
[INFO]  Running 'npx @patternfly/pf-codemods@latest /workspace --v6 --fix'
[INFO]  Committed pf-codemods changes on pf-codemods-051926-1421
Switched to branch 'semver/goose/051926-1418'

[STEP 2/3] Running evaluation agent
[INFO]  Evaluating: original_2.1.0 → pf-codemods-051926-1421 vs semver/goose/051926-1418
[INFO]  Follow logs: tail -f /opt/patternfly-tools/logs/20260519T142125/eval-agent.log
[INFO]  Running 'GOOSE_MODE=auto goose run -i /tmp/pf-eval.XiiEQW/eval_prompt.md'
[WARN]  Evaluation agent exited with non-zero status. Check /opt/patternfly-tools/logs/20260519T142125/eval-agent.log
[WARN]  Evaluation report not found at /workspace/pf-migration-comparison-report.html

[STEP 3/3] Cleaning up
[INFO]  Deleted pf-codemods branch: pf-codemods-051926-1421

[INFO]  Evaluation complete!
[INFO]  Project: /workspace
[INFO]  Logs: /opt/patternfly-tools/logs/20260519T142125/
[INFO]  Total eval runtime: 0m9s
[INFO]  Eval logs in: /Users/jmatthews/synced/semver_example_runs/2026_05_19_a_container/.pf-migration-logs/

real    3m15.530s
user    0m0.129s
sys     0m0.146s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment