Skip to content

feat: deprecate tracer path and migrate to opensre#1232

Merged
VaibhavUpreti merged 8 commits intomainfrom
feat/deprecate_tracer_paths
May 3, 2026
Merged

feat: deprecate tracer path and migrate to opensre#1232
VaibhavUpreti merged 8 commits intomainfrom
feat/deprecate_tracer_paths

Conversation

@VaibhavUpreti
Copy link
Copy Markdown
Member

No description provided.

@mintlify
Copy link
Copy Markdown

mintlify Bot commented May 3, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
tracer 🟢 Ready View Preview May 3, 2026, 1:51 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 3, 2026

Greptile Summary

This PR migrates the codebase from the legacy tracer brand to opensre: renaming the home directory from ~/.tracer to ~/.opensre, adding an automatic one-time migration for the integrations store, tightening the sandbox write-root to the new per-user temp dir, and adding platform-aware keyring setup guidance. All doc references and CloudWatch log group paths are updated with a staged-migration env-var escape hatch.

Confidence Score: 5/5

Safe to merge — all findings are P2 and the migration logic is well-guarded and tested.

Only one P2 finding (hardcoded /tmp/opensre in a tool description string); no P1 or P0 issues. Migration path, sandbox restriction, permissions hardening, and keyring UX improvements are all correct and covered by tests.

app/tools/run_diagnostic_code.py — hardcoded platform path in tool description

Important Files Changed

Filename Overview
app/constants/init.py Renames TRACER_HOME_DIR → LEGACY_TRACER_HOME_DIR, adds OPENSRE_TMP_DIR via tempfile.gettempdir(), and introduces ensure_opensre_tmp_dir() with 0o700 permissions — clean and well-structured
app/integrations/store.py Adds _migrate_legacy_store_if_needed() to move ~/.tracer/integrations.json → ~/.opensre on first access; migration guard correctly handles test-patching edge cases
app/sandbox/runner.py Bakes OPENSRE_TMP_DIR into the sandbox preamble f-string at import time; path-prefix check improved with sep-aware startswith; temp script now written under OPENSRE_TMP_DIR
app/tools/run_diagnostic_code.py Tool description hardcodes /tmp/opensre rather than using the runtime OPENSRE_TMP_DIR constant, which is wrong on macOS/Windows
app/llm_credentials.py Adds get_keyring_setup_instructions() with platform-aware Linux/GNOME guidance; error messages simplified with detailed instructions delegated to the new helper
tests/utils/cloudwatch_logger.py Log group prefix extracted to _log_group_prefix() with CLOUDWATCH_LOG_GROUP_PREFIX env-var override for staged migration
tests/integrations/test_store_migration.py Adds test for legacy store migration: confirms file is moved, v1 records are upgraded, and the original path is removed
app/cli/support/uninstall.py Switches TRACER_HOME_DIR import to LEGACY_TRACER_HOME_DIR and reorders _data_dirs() so OPENSRE_HOME_DIR is removed first

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[_load_raw called] --> B{STORE_PATH exists?}
    B -- yes --> E[Load from ~/.opensre/integrations.json]
    B -- no --> C{LEGACY_STORE_PATH exists?}
    C -- no --> E2[Return empty v2 store]
    C -- yes --> D{Test isolation guard
STORE_PATH patched but
LEGACY_STORE_PATH not?}
    D -- yes --> E2
    D -- no --> F[mkdir ~/.opensre]
    F --> G[replace legacy → new path
os.replace]
    G -- OSError --> H[copy bytes + unlink]
    H -- OSError --> I[Log warning, return without migrating]
    G --> J[chmod 0o600]
    H --> J
    J --> E
Loading

Reviews (2): Last reviewed commit: "fix: ci" | Re-trigger Greptile

Comment thread app/constants/__init__.py Outdated
Comment thread app/integrations/store.py Outdated
Apply ruff formatting to integrations store and extend the Mintlify Vale allowlist for domain-specific terms so quality and docs validation checks pass on this branch.

Co-authored-by: Cursor <[email protected]>
Signed-off-by: vaibhav upreti <[email protected]>
@VaibhavUpreti
Copy link
Copy Markdown
Member Author

@greptileai review

@VaibhavUpreti VaibhavUpreti merged commit 0a0c307 into main May 3, 2026
15 checks passed
@VaibhavUpreti VaibhavUpreti deleted the feat/deprecate_tracer_paths branch May 3, 2026 22:50
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 3, 2026

LGTM → Merged. @VaibhavUpreti, your work is in. Every commit counts — thank you for this one.


👋 Join us on Discord - OpenSRE : hang out, contribute, or hunt for features and issues. Everyone's welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant