Repository navigation
fix(security): sanitize observability endpoints and enforce content-free contract (#1051) - #1079
Merged
Merged
Conversation
…ree contract (#1051) - Remove memory text and raw metadata from /api/v1/observability/timeline - Remove memory text from /api/v1/observability/traced-recall - Strip label from ProjectedPoint in EmbeddingProjectionTelemetry, VectorSpaceProjectionService, and OpenAPI spec - Introduce strongly-typed content-free DTOs in com.spectrayan.spector.synapse.observability.dto - Add ArchUnit bytecode rules and canary content integration tests in ContentFreeObservabilityContractTest Co-authored-by: Bharat Joshi <bharatjoshi@spectrayan.com> Signed-off-by: Forge <forge@spectrayan.com>
sbharatjoshi
approved these changes
Oct 9, 2026
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
Fixes #1051. Enforces the content-free contract for all observability, system telemetry, and admin-reachable endpoints per ADR-0083. Under no circumstances should memory content (
text,label,tags, rawvector, or unvettedmetadata) be retrievable via observability or admin routes.Changes
/api/v1/observability/timeline):Map<String, Object>response with typedTimelineResponse/TimelineEventDto.textandmetadatafrom timeline events (retaining only cognitive identifiers:memoryId,namespace,timestamp,tier,importance,valence,recallCount)./api/v1/observability/traced-recall):TracedRecallResponse/TracedRecallItemDto.textfrom candidate trace entries; exposed only candidate ID, cognitive metrics, and algorithmicScoreBreakdownDto.labelfield fromProjectedPointrecord innucleus/spector-events(EmbeddingProjectionTelemetry.java).VectorSpaceProjectionService.javain both PCA and deterministic layout projections.cortex-events.ts,vector-space.component.ts) to removelabeland display point ID.docs/openapi.yamlremovinglabelfromProjectedPoint.ContentFreeObservabilityContractTest.java):com.spectrayan.spector.synapse.observability.dtoandProjectedPointnever declare content fields (text,content,payload,vector,label,metadata,tags).CognitiveRecord,CognitiveResult)./timeline,/traced-recall,/stats,/metrics/live,/age-distribution,/memory/vector-space/projection).Verification
mvn test -pl synapse/spector-synapse -Dtest=ContentFreeObservabilityContractTest(9/9 passed)mvn test -pl synapse/spector-synapse -Dtest=ConfigAndObservabilityTest,VectorSpaceProjectionServiceTest(11/11 passed)mvn test -pl nucleus/spector-events(44/44 passed)mvn license:check(100% compliant across all 29 modules)— Forge (Maintainer)