Repository navigation
Keep local paths out of the approvals table and add render --redacted (GST-2048) - #4199
Merged
Merged
Conversation
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
pathLabels now covers file:// URIs, ~user, $HOME, %USERPROFILE%, UNC and Drive-relative paths, and the approvals table runs it on Asked and Still pending as well as Covers. Exact words stays verbatim. Review-Finding: p1/red-team#1 reader=red-team Review-Finding: p1/specialist-batched#1 reader=security Review-Finding: p1/specialist-batched#2 reader=testing Review-Finding: p1/red-team#2 reader=red-team Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Only a :// scheme prefix now keeps a slash path unlabelled, so ledger:/home/..., user@host:/home/... and run-/home/... get file-name labels, and file:/ and FILE:/// paths match. Granted fix-check a-5b68cd273658. Review-Finding: p2/adversarial-native#1 reader=adversarial-native Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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.
gstack-approvals renderno longer prints local filesystem paths in the approvals table of a PR body, and--redactedforces the public form on any repository.What changed
…/<file name>, and a bare home directory as~. That covers absolute and home paths (~/,~user/,$HOME/,/home/…,/Users/…), Windows-drive, UNC andfile:paths in any case, Drive-relative.capy/drive/…paths, and paths glued onto a:or-such asledger:/home/…. Only a://scheme prefix keeps a slash path as written. Exact words stays verbatim because it is the owner's quote, andgstack-approvals listkeeps the full record.render --redactedprints the same bytes a public repository gets.--redactedwith--fullis a usage error (exit 2) with nothing on stdout.--redactedis used on a private repository.Why
On a private repository
renderprinted the full table with each row's text as recorded. On garrytan/gstack-evals#289 that put a ledger path under/home/<user>/.capy/drive/…into 102 spend-cap rows. gstack-post flags that asinternal.user_path, and because a PR description keeps its edit history, the path would stay readable after the repository went public.Blast radius
pathLabelshas one production caller,renderRecord, and the table stays display only:lib/ship-receipt-prose.tsfinds the block by its header and footer and never parses cells, and labels never add a|. The ship-receipt-prose, plan-record and module-size tests pass on this head (51/0 with the spawnSync tripwire).Review notes
These are below the blocking floor and are recorded here, not fixed in this PR.
/api/v1/usersbecomes…/users.-or:, such as GitLab'shttps://gitlab.com/g/p/-/merge_requests/12, renders as…/12after that segment.~2/3style approximations render as…/3.C:\Users\Garry Tan\x.mdbecomes~ Tan\x.md..capy/drive/(project-user-<project>-<person>/x.md) and paths that end at a Drive scope or/var/home/<name>folder keep that folder name;~useris ASCII only.Documentation
Status: current. No documentation changes were needed.
Scope: base 68b1d05..6f58ad1 (3 commits). Changed files:
bin/gstack-approvals,lib/approval-record.ts,test/approval-record.test.ts,docs/skills.mdandchangelog.d/keep-local-paths-out-of-approvals-render.md. There were no staged, unstaged or new files. I searched every doc and template that mentionsgstack-approvals render.Documentation health:
docs/skills.md: current. The branch already documents path labels,--redactedand the--fullconflict.changelog.d/keep-local-paths-out-of-approvals-render.md: current. It matches the code.ship/sections/capy-pr.md.tmpl: current. It could also mention--redacted(optional).capy/skill/gstack/captain.md,docs/ship-policy.md,docs/troubleshooting.md: current. Nothing quotes the old redacted sentence.Coverage debt:
render --redactedis covered in reference docs (docs/skills.mdand the CLI help) but has no how-to guide. That is a common gap, not a critical one.Diagram drift: none.
Test plan
bin/gstack-post pr-bodyprintedinternal.user_path, and--redactedwas an unknown argument.bun test test/approval-record.test.tsat 6f58ad1: 47 pass, 0 fail. New cases post a private render throughbin/gstack-postand assert nointernal.user_path, including five colon-, dash- andfile:-glued forms with an https control left unchanged.bun run typecheck: 0 errors.typecheck:test: none new.Not in scope: a ship-policy key such as
approvals_render: redacted, and any /ship template change.Agent notes
Approvals
Approved: yes (record r-84776ab9f1a6). The full approval record stays private: this repository is public or its visibility is unknown.
REVIEW_LOOP: passes=2 blocking_found=1 deferred=0 noted=5 fixed=4 scope=frozen unbound=1 fix_checks=1 dispatches=8
Gate edits: none detected (2 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Review-loop grant: a-5b68cd273658 (one scoped fix-check after round 2; fix-check found nothing blocking)