Fix compliance-gap signaling: distinct reason for complete vs. partial source coverage#4
Merged
chrismaz11 merged 2 commits intomainfrom Mar 18, 2026
Merged
Conversation
Co-authored-by: chrismaz11 <24700273+chrismaz11@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update tasks to manage inbox effectively
Fix compliance-gap signaling: distinct reason for complete vs. partial source coverage
Mar 18, 2026
Copilot stopped work on behalf of
chrismaz11 due to an error
March 18, 2026 13:43
There was a problem hiding this comment.
Pull request overview
This PR improves review-queue/audit-trace clarity by ensuring compliance-gap signaling (“no registry source returned SUCCESS”) is distinguishable from partial/incomplete source coverage during route_review().
Changes:
- Split
route_review()logic socompliance_gapproduces a distinct, specific reason string while incomplete coverage retains the generic message. - Add unit tests to assert the two cases produce distinct reasons without overlap.
- Update architecture docs to mark several enterprise-hardening gaps as resolved and adjust the Codex handoff summary accordingly.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/trustagents/oracle/stages/review.py |
Separates compliance-gap vs incomplete-coverage reason selection in review routing. |
tests/unit/test_observability_and_compliance_gap.py |
Adds tests validating distinct review-routing reasons for compliance gap vs incomplete coverage. |
docs/architecture/enterprise-gap-analysis.md |
Updates gap status tables/priority list to reflect implemented observability, receipts, errors, and compliance-gap signaling. |
docs/architecture/codex-handoff-summary.md |
Updates build status items to reflect implemented receipt lifecycle, logging, errors, and compliance-gap handling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| conflicting_sources=False, | ||
| ) | ||
| assert needs_manual is True | ||
| assert any("Compliance gap" in r for r in reasons) |
Contributor
|
@copilot apply changes based on the comments in this thread |
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.
The
compliance_gaprisk flag (no source returned SUCCESS) and partial source coverage (not source_results_complete) were collapsed into the same generic"Registry coverage incomplete"reason inroute_review(), making them indistinguishable in review queue entries and audit traces.Changes
oracle/stages/review.py— Split the combinedorcondition into two branches:compliance_gapnow emits"Compliance gap: no registry source returned a successful result"; partial coverage keeps"Registry coverage incomplete".tests/unit/test_observability_and_compliance_gap.py— Two new tests asserting the distinct reason strings for each branch and verifying no cross-contamination.docs/architecture/enterprise-gap-analysis.md— Marks Observability (structured logging), Receipt Lifecycle, Error Handling, and Compliance-gap Signaling as resolved; remaining open items are retry logic, metrics/tracing, durable storage, HMAC signatures, and CI/CD.docs/architecture/codex-handoff-summary.md— Updates the "What Codex Did Not Build" list to strike through items that have since been implemented; corrects the receipt generation row fromPartialtoComplete.💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.