Repository navigation
Conversation
…uption When CDPATH is set, cd prints the resolved path to stdout, corrupting $(cd ... && pwd) assignments. This breaks all bin/ scripts by doubling the directory path in variable assignments. Fix: redirect cd stdout to /dev/null in all path resolution patterns. pwd still outputs the correct path to stdout for the command substitution. Fixes garrytan#824
Owner
|
Closing — duplicate of several PRs fixing the same CDPATH issue in bin/ scripts. Thank you for the contribution! |
capy-ai Bot
added a commit
that referenced
this pull request
Nov 17, 2026
… result (GST-2349) (#4285) * Stop /ship's docs audit halting when the child writes prose after its result (GST-2349) The Step 14.5 documentation audit read only the child's last nonempty line. Children that ended with their JSON result and then restated the documentation section in prose had a valid "current, no edits" audit rejected with no format repair, which spent an attempt each time and, after two, stopped /ship for an owner risk grant (founderstar #837, harness-evals #393). gstack-docs-candidate result now reads the last line that opens a JSON object, ignores prose after it and says so with TRAILING_PROSE:. A result missing only documentation_section keeps the existing free re-ask, whose prompt now tells the child to put the section inside the JSON and write nothing after the line; the re-audit retry note says the same. Content failures still count. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Send any docs-audit result with text after it back for one free re-ask (GST-2349) A cross-family audit of the previous commit showed that ignoring prose after the result line let a contradicting verdict through: a blocked result followed by a fenced "current" example was accepted as current, and a "Correction: the audit is BLOCKED" after a current line became a repair that had to stay current. Text after a JSON line carrying the audit id is no longer ignored and never searched for another result. It is a format slip: FORMAT_REPAIR re-asks once for the whole result line without spending an attempt, the re-ask counts everything the audit wrote after its JSON line, and the reply is judged on its own with nothing kept from the first line. A reply that itself has text after its line counts as an attempt. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Keep a blocked docs audit blocked through the free re-ask (GST-2349) Review of the previous change found that the free whole-line re-ask could turn a blocked audit into a passing one: a blocked result line, then a fenced "current" example, then a "current" reply was accepted as current. The re-ask now works one way. It is offered only when every JSON line that carries the audit id is free of content problems; a content problem such as a missing status or "current" with edits still spends an attempt. If any of those lines said blocked or listed a blocker, the reply must stay blocked and keep every blocker (it may add more), and the re-ask prompt says so. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cdstdout in all 18 affectedbin/scripts to preventCDPATHfrom corrupting path resolution>/dev/nullredirect oncdin$(cd ... && pwd)patternsRoot cause
When
CDPATHis set (common with zsh users, zoxide, or custom navigation),cdprints the resolved path to stdout. This doubles the output of$(cd ... && pwd), corruptingGSTACK_DIR,SCRIPT_DIR, andREPO_ROOTassignments. Most visibly,gstack-update-checksilently exits becauseVERSION_FILEbecomes a two-line string.Fix
All 18 scripts fixed
dev-setup, dev-teardown, gstack-community-dashboard, gstack-extension, gstack-learnings-log, gstack-learnings-search, gstack-platform-detect, gstack-relink, gstack-repo-mode, gstack-review-log, gstack-review-read, gstack-specialist-stats, gstack-telemetry-log, gstack-telemetry-sync, gstack-timeline-log, gstack-timeline-read, gstack-uninstall, gstack-update-check.
Testing
All 18 pass syntax check. Fix verified with
CDPATH='.:/tmp'set.Note: PR #836 fixes 7 of 18 scripts. This PR covers all 18.
Fixes #824