Repository navigation
fix(cli): take verify env-var prefix from the CLI manifest - #5254
Conversation
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.
Merge Protections🟢 All 2 merge protections satisfied — ready to merge. Show 2 satisfied protections🟢 require-ready-label-and-ci
🟢 🚦 Auto-queueWhen all merge protections are satisfied and these conditions match, this pull request will be queued automatically.
|
[Low impact] The PR appears safe to merge. Summary
Reviews (1) · Last reviewed commit: "fix(cli): take verify env-var prefix fro..." · Reviewed by Greptile |
|
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. |
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
|
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
AI / Automation Disclosure