feat(research): retain exact experiment and report citations in findings

This commit is contained in:
Boki 2026-10-24 14:42:14 -04:00
parent 46a4f13acd
commit 06039d17ba
36 changed files with 4170 additions and 253 deletions

View file

@ -3,6 +3,24 @@ export type ResearchActor = 'operator' | 'service';
export type ResearchContentOrigin = 'human' | 'ai' | 'unknown';
export type ResearchMetricsVersion = 'canonical-analytics/v1' | 'legacy-display/v1';
/** Exact retained source of selected measurements; never a validation of the narrative. */
export type ResearchFindingSource =
| { kind: 'experiment/v1'; experimentId: string; previewHash: string }
| {
kind: 'chronological-report/v1';
validationId: string;
previewHash: string;
reportId: string;
reportHash: string;
}
| {
kind: 'walk-forward-report/v1';
walkForwardId: string;
previewHash: string;
reportId: string;
reportHash: string;
};
export interface ResearchAuthorship {
submittedBy: ResearchActor;
/** Declared content origin, not authenticated model/agent identity. */
@ -66,6 +84,8 @@ export interface ResearchArtifactRevision extends ResearchAuthorship {
validationState: 'unvalidated';
evidenceState: 'none' | 'referenced';
evidence: ResearchEvidence[];
/** Absent on older clients/fixtures. New responses use null for unscoped evidence. */
source?: ResearchFindingSource | null;
createdAt: string;
}
export interface ResearchArtifact {