Scope + sanitize the Atlas corpus for external builders#138
Merged
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.
Summary
Scopes + sanitizes the Atlas harvest corpus so agent-facing curated knowledge is safe + relevant for external builders. Three layers:
sanitize-env-refs.tsadapter pass): machine-local paths → repo-relative or<local-path>(home-root files,/srctails, separator-precededCONFIG=//path:/cwd=, and placeholder-abutting paths); session UUIDs stripped; private Notion ids/URLs (.so/.com, multi-segment, context-anchored/p/, multi-label subdomains) →<notion-page-link>; internal Slack allowlist; railway hosts+projects (case-insensitive, multi-label, uniform left-boundary) →<internal-service>;@copilotkit.aiemails. Placeholder-safe + idempotent. Includes a github-adapter content-extraction fence-parity fix so the extracted corpus content is correctly scoped upstream of sanitization.enforceAudienceRelevancegate: marks internal-ops candidatesapprovable=falsevia a shared floor predicate + rank-score floor; fail-restrictiveknowledge_typecoercion; dual-carrier stale-marker strip on verdict flip; whitespace-run + trailing-token-tolerant verdict parse; tightened HTTP-status pre-screen.Directly addresses the machine-local paths (
/proj/cpk,/Users/jpr5), private Notion refs, session ids, and internal-ops-relevance that were leaking into corpus candidates.Testing
Red-green for every fix; full suite 3554 passing. CR Tier-3 converged over 9+ review/confirmation rounds + a Procedure 3 audit (K=2 clean); caught + fixed 2 integration-coupling breaks mid-blitz + multiple rounds of leak/floor-escape/corruption/correctness fixes.
Spec: https://app.notion.com/p/3963aa38185281db80b8e4bf73de0ea5
Follow-ups (non-blocking; Atlas not wired on in prod — S21 deferred)
NOTION_MARKERhyphen-boundary over-fire;notion.so/<33-hex-run>non-collapse.llm.tsembed element-type cast; adapter date-format validation;canonicalizeclaimSlug empty-title collision;harvest-clibuildArtifactCandidates RunStore threading.provenance.sourceis now<local-path>.