Draft
Conversation
Introduces a new `logs <commitsha>` subcommand that reads the authorship note for a commit, resolves transcript and database paths for each agent (claude, cursor, codex, copilot, windsurf, gemini, opencode, continue-cli, droid, amp), and packages everything into a zip file with metadata. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Databases (Cursor vscdb, OpenCode sqlite, Copilot vscdb) contain all sessions and are too large for a debug bundle. Working log blobs are full file snapshots, and INITIAL is seed attribution state — neither is useful for debugging checkpoint behavior. The bundle now only includes checkpoints.jsonl from working logs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| // Also check for debug-mode "old-<sha>" directory | ||
| let old_working_log_dir = repo.storage.working_logs.join(format!("old-{}", base_sha)); | ||
|
|
||
| let effective_wl_dir = if working_log_dir.is_dir() { |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
|
|
||
| let effective_wl_dir = if working_log_dir.is_dir() { | ||
| Some(&working_log_dir) | ||
| } else if old_working_log_dir.is_dir() { |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
Sanitize user-controlled inputs used in path expressions: - Validate commit SHA and base_commit_sha are hex-only before using in paths - Canonicalize output directory to resolve ".." components - Add symlink escape detection in collect_dir_recursive Addresses CodeQL "Uncontrolled data used in path expression" findings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
| /// Recursively collect all files in a directory, producing (relative_path, absolute_path) pairs. | ||
| /// Skips the `blobs/` subdirectory since those are full file snapshots that bloat the bundle. | ||
| fn collect_dir_recursive(base: &Path, dir: &Path, out: &mut Vec<(String, PathBuf)>) { | ||
| let entries = match fs::read_dir(dir) { |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
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.
No description provided.