fix(sandbox): rotate openshell.log daily, keep 3 files#430
Closed
Kh4L wants to merge 1 commit intoNVIDIA:mainfrom
Closed
fix(sandbox): rotate openshell.log daily, keep 3 files#430Kh4L wants to merge 1 commit intoNVIDIA:mainfrom
Kh4L wants to merge 1 commit intoNVIDIA:mainfrom
Conversation
Replace unbounded append-only log with a RollingFileAppender (daily rotation, max 3 files). tracing-appender is already a workspace dependency so no new crates are needed. Closes NVIDIA#30 Signed-off-by: Serge Panev <spanev@nvidia.com>
|
Thank you for your interest in contributing to OpenShell, @Kh4L. This project uses a vouch system for first-time contributors. Before submitting a pull request, you need to be vouched by a maintainer. To get vouched:
See CONTRIBUTING.md for details. |
|
All contributors have signed the DCO ✍️ ✅ |
Author
|
I have read the DCO document and I hereby sign the DCO. |
Author
|
recheck |
johntmyers
added a commit
that referenced
this pull request
Mar 18, 2026
The vouch-check workflow was closing PRs from NVIDIA org members because the GITHUB_TOKEN lacks read:org scope, causing orgs.checkMembershipForUser to return 404 for non-public members. The catch block silently swallowed these as expected 'not found' responses. Add an author_association check from the webhook payload as the primary bypass. GitHub sets this field server-side (MEMBER, OWNER, COLLABORATOR) regardless of membership visibility, with no extra token permissions needed. The existing API calls are kept as fallbacks. Fixes the false positive that closed #430.
4 tasks
johntmyers
added a commit
that referenced
this pull request
Mar 18, 2026
The vouch-check workflow was closing PRs from NVIDIA org members because the GITHUB_TOKEN lacks read:org scope, causing orgs.checkMembershipForUser to return 404 for non-public members. The catch block silently swallowed these as expected 'not found' responses. Add an author_association check from the webhook payload as the primary bypass. GitHub sets this field server-side (MEMBER, OWNER, COLLABORATOR) regardless of membership visibility, with no extra token permissions needed. The existing API calls are kept as fallbacks. Fixes the false positive that closed #430. Co-authored-by: John Myers <johntmyers@users.noreply.github.com>
This was referenced Mar 18, 2026
drew
pushed a commit
that referenced
this pull request
Mar 18, 2026
The vouch-check workflow was closing PRs from NVIDIA org members because the GITHUB_TOKEN lacks read:org scope, causing orgs.checkMembershipForUser to return 404 for non-public members. The catch block silently swallowed these as expected 'not found' responses. Add an author_association check from the webhook payload as the primary bypass. GitHub sets this field server-side (MEMBER, OWNER, COLLABORATOR) regardless of membership visibility, with no extra token permissions needed. The existing API calls are kept as fallbacks. Fixes the false positive that closed #430. Co-authored-by: John Myers <johntmyers@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.
Summary
/var/log/openshell.logwith aRollingFileAppenderthat rotates daily and retains at most 3 filestracing-appenderis already a workspace dependency inopenshell-sandbox/var/logis not writable (existing behavior preserved)Related Issue
Closes #30
Changes
crates/openshell-sandbox/src/main.rs: replacestd::fs::OpenOptions+non_blocking(file)withRollingFileAppender::builder()configured for daily rotation and a 3-file capTesting
mise run testpasses/var/log/openshell.YYYY-MM-DD.loginside a running sandboxChecklist
git commit -s)