Skip to content

fix(cli): take verify env-var prefix from the CLI manifest - #5254

Merged
mergify[bot] merged 1 commit into
mvanhorn:mainfrom
vieGPT:fix/verify-base-url-from-manifest
Oct 26, 2026
Merged

mergify[bot] merged 1 commit into
mvanhorn:mainfrom
vieGPT:fix/verify-base-url-from-manifest

Conversation

@vieGPT

@vieGPT vieGPT commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Intent

verify derived the mock base-URL variable from the folder name (naming.TrimCLISuffix(filepath.Base(cfg.Dir))), but a printed CLI reads _BASE_URL named after its spec (config.go.tmpl). A copy under another folder name never received the mock URL, so the data-pipeline leg failed with "sync crashed". Found while shipchecking a copy of a Wikipedia CLI; reproduced on petstore and stytch (original folder: PASS, renamed copy: FAIL).
Issue: N/A (found in a retro of that run)

Approach

Read api_name from .printing-press.json and apply naming.EnvPrefix, the same function the generated config uses. The default token variable uses the same prefix. Without a manifest or api_name, the folder-name rule is unchanged.

Scope

Primary area: scorer / verify (internal/pipeline/runtime.go)
Why this belongs in this repo: verify gives the same verdict for a tree under any folder name; copies in other folders are a supported workflow.

Risk

Trees with a manifest whose api_name differs from the folder name now get the variable the CLI really reads. Mock response building is untouched.

Output Contract

N/A (no template, generated file, manifest or scorecard output changes). golden.sh verify passes unchanged (43 cases).

Verification

  • go test ./internal/pipeline -run TestVerifyEnvPrefix (positive: manifest wins over the folder; negative: no manifest or empty api_name uses the folder)
  • Existing verify tests: -run 'TestRunVerify|TestRunDataPipeline|TestRunCommandTests|TestStartMockServer'
  • By hand: verify on a petstore print and a renamed copy: FAIL before, PASS after
  • scripts/golden.sh verify; go vet ./internal/pipeline; go build ./...; gofmt -l on changed files: empty
  • Not run locally: full go test ./... (left to CI)

AI / Automation Disclosure

  • No AI or automation was used
  • Human-reviewed: AI or automation was used, and a human reviewed the work for intent, fit, and obvious issues before submission
  • AI-reviewed only: an AI agent reviewed the work, but no human reviewed it before submission
  • Fully automated: generated and submitted without human review for this specific change

verify built the mock base-URL variable (and the default token variable)
from the folder name, but a printed CLI reads the variable named after its
API. A copy under any other folder name never received the mock URL, so
the data-pipeline leg failed with "sync crashed". Read api_name from
.printing-press.json and fall back to the folder name only when no
manifest or API name exists.
@mergify

mergify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 All 2 merge protections satisfied — ready to merge.

Show 2 satisfied protections

🟢 require-ready-label-and-ci

  • #changes-requested-reviews-by = 0
  • #review-threads-unresolved = 0
  • check-success = build-and-test
  • check-success = generated-test
  • check-success = go-lint
  • check-success = golden
  • check-success = pr-title
  • check-success = test
  • any of:
    • label = ready-to-merge
    • all of:
      • head = release-please--branches--main
      • title ~= ^chore\(main\): release
  • any of:
    • -files ~= ^(\.github/workflows/|\.github/scripts/|scripts/|\.github/CODEOWNERS$)
    • approved-reviews-by = mvanhorn
    • approved-reviews-by = tmchow
    • author = mvanhorn
    • author = tmchow
  • any of:
    • check-success = Greptile Review
    • label = queued
    • check-neutral = Greptile Review
    • check-skipped = Greptile Review
    • head ~= ^mergify/merge-queue/
    • all of:
      • head = release-please--branches--main
      • title ~= ^chore\(main\): release

🟢 🚦 Auto-queue

When all merge protections are satisfied and these conditions match, this pull request will be queued automatically.

  • label = ready-to-merge

@greptile-apps

greptile-apps Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

verify now uses APIName from .printing-press.json to choose the default token and mock base-URL variables.

  • Verify uses the CLI manifest to name its environment variables.

Reviews (1) · Last reviewed commit: "fix(cli): take verify env-var prefix fro..." · Reviewed by Greptile

@tmchow

tmchow commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Thanks @vieGPT, this is a real bug and a good fix. I'm queueing it to merge.

For next time: please file an issue before opening the PR, and have your agent do the same. "Found in a retro" in the PR body doesn't replace one. The Issue Work Ownership section of AGENTS.md covers it: search for an existing issue first, file one if there isn't a match, then claim it with an assignment or a comment before you start coding. It keeps us from doing duplicate work and gives triage something to prioritize against.

@tmchow tmchow added the ready-to-merge Queue when Mergify passes; scripts/.github PRs also need Approve from tmchow/mvanhorn. label Oct 26, 2026
@mergify mergify Bot added the queued PR is in the Mergify merge queue label Oct 26, 2026
@mergify
mergify Bot merged commit 2c6d738 into mvanhorn:main Oct 26, 2026
32 checks passed
@mergify

mergify Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 27 minutes 53 seconds in the queue, including 27 minutes 6 seconds running CI.

Required conditions to merge

@mergify mergify Bot removed the queued PR is in the Mergify merge queue label Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Queue when Mergify passes; scripts/.github PRs also need Approve from tmchow/mvanhorn.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants