Fix CLI version path resolution - #2454
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 29, 2026, 12:36 PM ET / 16:36 UTC. ClawSweeper reviewWhat this changesThe PR resolves CLI version metadata from the actual running executable rather than a possibly relative launch argument, and adds coverage for direct, relative, and symlink invocation paths. Merge readiness⛔ Blocked until stronger real behavior proof is added - 3 items remain Keep this PR open: current Priority: P2 Review scores
Verification
How this fits togetherCodexBar’s CLI prints its installed version by locating metadata next to its executable or inside an app bundle. The invocation path feeds metadata discovery, which produces the version text returned by flowchart LR
Launch[CLI invocation] --> Executable[Running executable path]
Executable --> Symlink[Resolve symlinks]
Symlink --> Source{Version metadata source}
Source --> VersionFile[Adjacent VERSION file]
Source --> BundleInfo[App bundle Info.plist]
VersionFile --> Output[CLI version output]
BundleInfo --> Output
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the executable-path resolution approach and merge after a redacted current-head terminal transcript shows the expected version for direct, relative, and symlink launches from a different working directory. Do we have a high-confidence way to reproduce the issue? No, not through a fresh runtime run in this read-only review. The current-main source makes the mechanism source-reproducible because it uses the relative launch argument as a filesystem path for adjacent metadata lookup. Is this the best way to solve the issue? Yes, provisionally. Resolving the actual executable path preserves the existing VERSION and app-bundle metadata behavior while removing dependence on the caller’s working directory; the remaining need is runtime proof on the current head. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fa9343a11d02. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
|
Proof: |
2e273d1 to
1d8d496
Compare
1d8d496 to
cf79447
Compare
|
Merged after full verification. CLI version metadata now resolves from the running executable ( Added during review: a real regression exercising the reported failure — invocation via a stale relative |
Problem
When the CLI is invoked through a relative path or symlink, version lookup used
argv[0]relative to the current working directory. This could prevent CodexBar from finding the adjacentVERSIONfile or app-bundle metadata and result in a missing or incorrect displayed version.Summary
• Resolve CLI version metadata from the actual executable path instead of relative
argv[0].• Preserve symlink-aware
VERSIONand app-bundleInfo.plistlookup.• Add regression coverage for bundle executable resolution.