Repository navigation
fix(diff-logs): find the repo root from subdirectories and keep probe scripts out of placement - #26
Merged
Merged
Conversation
…xclude for placement Signed-off-by: Ilan Harel <[email protected]>
ilanh
force-pushed
the
fix/diff-logs-root-and-excludes
branch
from
November 3, 2026 08:19
27a78f5 to
266dc1c
Compare
ilanh
added a commit
that referenced
this pull request
Nov 3, 2026
…entials (#30) ## What and why Three of five tested projects needed a hand-written custom provider profile, and `providers.sh` only said `# UNMAPPED ... write a custom profile`. - **`generate --scaffold-profiles DIR`** writes `DIR/<id>.yaml` for every unmapped credential (id = env var lower-cased with hyphens): the credential, plus endpoints, `access` and binaries taken from the `egress` directives in the file that declares the credential. `tls=skip` endpoints get `allow_uninspected_credentials: true` (OpenShell's profile lint requires it for L4-only credentialed endpoints); credentials with no egress in their file get `endpoints: []` and TODO comments. Existing files are kept, nothing is written without the flag, no secret values are involved. The `UNMAPPED` comment in `providers.sh` now points to the flag. - **Misleading duplicate warning:** `egress X duplicates an endpoint the profile adds` is now only shown when the profile's `binaries` overlap the rule's binaries (profile bound to `gh`/`git`, app is `node`: the explicit rule is needed, no warning). Profiles that list no binaries keep the old behaviour. - README section "Credentials with no provider profile"; CLI.md regenerated. Checked with the real tool: skeletons generated from anthropic-proxy-rs's sidecar (`tls=skip` case) and synthetic cases all pass `openshell provider profile lint -f` (OpenShell 0.1.6 on the dev server). CI cannot run that, so the tests reload the skeletons with our own profile loader. Tests: `tests/scaffold_profiles.rs` (3 tests) and a unit test. `TOOLCHAIN=1.94 scripts/ci-local.sh` and stable clippy pass. Ordering: independent (new module `scaffold.rs`; small edits in `providers.rs`, `generate.rs`, `main.rs`'s `Generate` arm). Another PR (#26) edits other parts of `main.rs`, and #21/#25 edit `do_scan`; any of them may need a trivial rebase. Closes #13 --------- Signed-off-by: Ilan Harel <[email protected]> Co-authored-by: Ilan Harel <[email protected]>
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.
What and why
Two
diff-logsproblems found when the probe driver lived inside the repo:cd openshell && openshell-annotate diff-logs sandbox-logs.txtscanned only that directory (0 stale, wrongplace:). When--rootis not given,diff-logsnow walks up to the nearestopenshell-annotate.toml(like git), printsnote: using repository root ..., and loads that config. The log paths you pass are still resolved from where you run it. An explicit--rootother than.is never second-guessed. (The other commands take explicit path arguments relative to the working directory, so I left their root handling alone.)diff-logs --writeinserted directives intoopenshell/exercise.shbecause it mentions the host. New[diff-logs] excludepatterns (same literal syntax as[scan].exclude) keep files from being picked as the place for a suggestion, while directives inside them still count. The--observed-fileis always skipped.Docs: README config block,
--roothelp (CLI.md regenerated).Tests:
tests/diff_logs_root.rs(subdirectory run,--writefrom a subdirectory, exclude vs no exclude, observed file never a target).TOOLCHAIN=1.94 scripts/ci-local.shand stable clippy pass.Ordering: edits the
diff-logsarm ofmain.rsandfind_mentionindiff_logs.rs; the TLS PR (#24) edits other parts ofdiff_logs.rs, so a rebase of the second one to merge may be needed.Closes #11