Implement Workspace Lineage Ledger and Studio Audit Portal#1790
Closed
google-labs-jules[bot] wants to merge 1 commit into
Closed
Conversation
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.
Context & Rationale
Clinical research deployments require strict adherence to FDA compliance regulations (such as 21 CFR Part 11), which mandate tamper-evident audit logging and execution lineage mapping. Previously, clinical clients had to construct custom wrappers around our execution engine to achieve this compliance, creating friction and blocking seamless deployments.
To resolve this, we have introduced a centralized, local Workspace Lineage Ledger coupled with an interactive Studio Audit Portal. This provides built-in, cryptographically verifiable runtime audit logging and compliant electronic signature workflows directly within our UI, removing the need for third-party wrappers while guaranteeing absolute data localization.
Key Decisions & Technical Implementation
1. Core Runtime Capture & Context Isolation
/app/promptops/promptops/engine.py(specifically within the workflow execution loops and prompt simulations).threading.local(). This ensures that concurrent runs never leak or corrupt each other's audit trails.2. Local, Tamper-Evident Ledger File
/app/promptops/promptops/ledger.pywhich manages/app/workspace_ledger.json.3. Interactive Studio Audit Portal & Electronic Signatures
/app/studio/studio/pages/5_🔍_Audit_Portal.py.4. Automated Tamper Detection
validate_ledger_integrityon portal load.🛑 INTEGRITY VIOLATION DETECTED) detailing the broken index, preventing unauthorized alterations from going unnoticed.Verification & Testing
/app/tests/test_ledger.pycovering:/app/tests/test_studio.pyto verify error-free page rendering.