Repository navigation
Pussy888 Must Download Pussy888 Offers Safely Regular
Pussy888 pussy888, pussy888, pussy888, Why Pussy888 Slotgame Access Download Pussy888 Pussy888 Client Thailand Depositing pussy888, pussy888 offers free real money rewards bonuses and real money gambling on casinos slots and other games, why pussy888 stands out a deep dive into its unique features and perks, download pussy888 slot apk in malaysia 2025.
Download puss888 apk v10 8 9 latest, pussy888 pussy888, learn about pussy888 malaysia s trusted online casino and sportsbook our mission values and commitment to safe Pussy888 Download Science Online Download The Latest Spins Cashback fast and fair gaming for malaysian players.
Pussy888 Out Pussy888 Try Pussy888 Slotgame Over Interface
Pussy888 pussy888, telegram channel pussy888 slotgame jackpot, lepas download game Pussy888 Live Live Pussy888 Offers Free About Jackpot Designed akan dpt free credit lepas menang janji dapat withdraw, pussy888 download latest apk ios malaysia 2026.
Get the official pussy888 apk download link to play your favorite online slot game check out the tips and tricks to win pussy888 here, description Pussy888 With Puss888 Its Explore Why Dpt Complete Open download pussy888 safely with our official step by step guide for android apk ios and pc verify files avoid scams and learn updates bonuses and troubleshooting.
Pussy888 Download Client University Slots It Is The May Devices
Pussy888 game list 2026 all slots table live casino games, pussy888, download pussy888 malaysia apk, pussy888, pussy888 pussy888, explore why pussy888 is a top choice for online casino players learn about the unique features and perks that make pussy888 stand out in Pussy 888 Are Table Pussy888 Game List Market Without You the crowded market.
Pussy888 online gambling, the pussy888 demo id gives you a chance to experience malaysia s most popular online casino app for free it s Download Pussy888 Free Apps Apps Pussy888 Pussy888 395 Credit the perfect way to test slots fishing games and table games without depositing a single ringgit.
Pussy888 pussy888, 2025 pussy888 Pussy888 Casino Games About Client Slotgame It Is The Gives 100 all rights reserved view our privacy policy and our cookie policy, explore pussy888 malaysia s favorite slot game platform download the new version apk for free enjoy exciting slot games and experience top notch gaming start your journey with pussy888 today.
Pussy888 Download Technology Who Slot 2025 Pussy888 Aug Chance
When you search for online betting apps then you might get confused as there are a Pussy888 Download Must Perks All Description Download Pussy888 Rm60 Reserved ton of options available but we always prefer the puss888 apk as it s one of the most trusted and reputed apps for betting your money on various games including the poker casino slots and many others you might find a ton of amazing online betting games in this app to try out and earn huge rewards as.
gnaneshwer23 wants to merge 2 commits into
Conversation
…ity and no promotion
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Sorry @gnaneshwer23, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 4 days and 11 hours by commenting |
Reviewer's GuideEstablishes a read-only, validation-only foundation for RA evidence intake and reproducible disease dossiers: all intake remains quarantined pending independent scientific review, while dossiers capture reproducibility metadata and cannot be promoted to the graph or represent PHI. Sequence diagram for quarantined RA evidence intake validationsequenceDiagram participant Submitter participant Validator as validateRaEvidenceIntake participant Review as IndependentScientificReview participant Graph Submitter->>Validator: validateRaEvidenceIntake(intake) Validator-->>Submitter: RaIntakeResult(status=quarantined_for_independent_review) Validator->>Review: reviewRequirements Review-->>Graph: claim-level approval required Graph-->>Validator: graphPromotable=false File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
8 issues found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately. <file name="test/raEvidenceDossier.test.ts"> <violation number="1" location="test/raEvidenceDossier.test.ts:8"> P2: This test does not cover the reproducibility contract it names. Assert the returned method metadata and add invalid-method/invalid-digest cases so the validator cannot regress to checking length alone.</violation> </file> <file name="src/raEvidenceDossier.ts"> <violation number="1" location="src/raEvidenceDossier.ts:4"> P2: The new intake and dossier APIs are inaccessible through the package entry point because this module is not re-exported. Add the module’s types and validators to `src/index.ts` (and a package subpath if that is the intended API).</violation> <violation number="2" location="src/raEvidenceDossier.ts:8"> P2: RegExp.test coerces its argument, so non-string JSON values such as numeric `pmid` or array `id` pass validation. Add `typeof` string checks before the regex tests so the strict contract rejects them.</violation> <violation number="3" location="src/raEvidenceDossier.ts:8"> P2: This validator accepts a malformed DOI and a URL for a different PMID, so the intake's source identity can describe two different articles. Validate a non-null DOI and require the canonical URL identifier to match `source.pmid` before returning the quarantined result.</violation> <violation number="4" location="src/raEvidenceDossier.ts:16"> P1: `codeCommit` is checked with the generic `id` regex, so mutable refs like `main` or `HEAD` pass validation. Require a full commit SHA, for example `/^[a-f0-9]{40}$/i`, so the dossier pins the exact code version.</violation> <violation number="5" location="src/raEvidenceDossier.ts:16"> P2: The intake and dossier validators accept ambiguous or normalized date strings as reproducibility timestamps. Require the repository’s strict timestamp format, not just a successful `Date.parse`.</violation> <violation number="6" location="src/raEvidenceDossier.ts:16"> P2: The validator accepts `parameters: []` as a valid parameter record, so the returned dossier does not satisfy its own schema. Reject arrays and require a plain object before checking parameter keys and values.</violation> <violation number="7" location="src/raEvidenceDossier.ts:16"> P2: A dossier with no evidence references currently validates successfully, contradicting the requirement that dossiers retain evidence references. Reject an empty `evidenceIntakeIds` list and empty `sourceEvidenceIds` lists for findings.</violation> </file> Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| } | ||
| export type ReproducibleDiseaseDossier={schemaVersion:"hsi-disease-dossier-1";investigationId:string;disease:"systemic_sclerosis"|"rheumatoid_arthritis";dataset:{id:string;version:string;sha256:string};analysis:{method:string;methodVersion:string;parameters:Record<string,string>;codeCommit:string;executedAt:string};evidenceIntakeIds:string[];findings:Array<{id:string;description:string;sourceEvidenceIds:string[];classification:"association"|"computational_inference"|"unvalidated_hypothesis"}>;review:{state:"draft"|"in_review";reviewerDecisionId:null};graphPromotable:false;containsPhi:false}; | ||
| export function validateDiseaseDossier(d:ReproducibleDiseaseDossier):ReproducibleDiseaseDossier{ | ||
| if(!d||d.schemaVersion!=="hsi-disease-dossier-1"||!id.test(d.investigationId)||!["systemic_sclerosis","rheumatoid_arthritis"].includes(d.disease)||!id.test(d.dataset?.id)||!id.test(d.dataset?.version)||! /^[a-f0-9]{64}$/i.test(d.dataset?.sha256)||!d.analysis?.method?.trim()||!id.test(d.analysis?.methodVersion)||!id.test(d.analysis?.codeCommit)||Number.isNaN(Date.parse(d.analysis?.executedAt))||!d.analysis.parameters||Object.keys(d.analysis.parameters).length>100||Object.entries(d.analysis.parameters).some(([k,v])=>!id.test(k)||typeof v!=="string"||v.length>500)||!Array.isArray(d.evidenceIntakeIds)||d.evidenceIntakeIds.length>500||d.evidenceIntakeIds.some(x=>!id.test(x))||!Array.isArray(d.findings)||d.findings.length>500||d.findings.some(f=>!id.test(f.id)||!f.description?.trim()||!Array.isArray(f.sourceEvidenceIds)||f.sourceEvidenceIds.some(x=>!id.test(x))||!["association","computational_inference","unvalidated_hypothesis"].includes(f.classification))||!["draft","in_review"].includes(d.review?.state)||d.review.reviewerDecisionId!==null||d.graphPromotable!==false||d.containsPhi!==false)throw Error("Invalid reproducible disease dossier"); |
There was a problem hiding this comment.
P1: codeCommit is checked with the generic id regex, so mutable refs like main or HEAD pass validation. Require a full commit SHA, for example /^[a-f0-9]{40}$/i, so the dossier pins the exact code version.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/raEvidenceDossier.ts, line 16: <comment>`codeCommit` is checked with the generic `id` regex, so mutable refs like `main` or `HEAD` pass validation. Require a full commit SHA, for example `/^[a-f0-9]{40}$/i`, so the dossier pins the exact code version.</comment> <file context> @@ -0,0 +1,18 @@ +} +export type ReproducibleDiseaseDossier={schemaVersion:"hsi-disease-dossier-1";investigationId:string;disease:"systemic_sclerosis"|"rheumatoid_arthritis";dataset:{id:string;version:string;sha256:string};analysis:{method:string;methodVersion:string;parameters:Record<string,string>;codeCommit:string;executedAt:string};evidenceIntakeIds:string[];findings:Array<{id:string;description:string;sourceEvidenceIds:string[];classification:"association"|"computational_inference"|"unvalidated_hypothesis"}>;review:{state:"draft"|"in_review";reviewerDecisionId:null};graphPromotable:false;containsPhi:false}; +export function validateDiseaseDossier(d:ReproducibleDiseaseDossier):ReproducibleDiseaseDossier{ + if(!d||d.schemaVersion!=="hsi-disease-dossier-1"||!id.test(d.investigationId)||!["systemic_sclerosis","rheumatoid_arthritis"].includes(d.disease)||!id.test(d.dataset?.id)||!id.test(d.dataset?.version)||! /^[a-f0-9]{64}$/i.test(d.dataset?.sha256)||!d.analysis?.method?.trim()||!id.test(d.analysis?.methodVersion)||!id.test(d.analysis?.codeCommit)||Number.isNaN(Date.parse(d.analysis?.executedAt))||!d.analysis.parameters||Object.keys(d.analysis.parameters).length>100||Object.entries(d.analysis.parameters).some(([k,v])=>!id.test(k)||typeof v!=="string"||v.length>500)||!Array.isArray(d.evidenceIntakeIds)||d.evidenceIntakeIds.length>500||d.evidenceIntakeIds.some(x=>!id.test(x))||!Array.isArray(d.findings)||d.findings.length>500||d.findings.some(f=>!id.test(f.id)||!f.description?.trim()||!Array.isArray(f.sourceEvidenceIds)||f.sourceEvidenceIds.some(x=>!id.test(x))||!["association","computational_inference","unvalidated_hypothesis"].includes(f.classification))||!["draft","in_review"].includes(d.review?.state)||d.review.reviewerDecisionId!==null||d.graphPromotable!==false||d.containsPhi!==false)throw Error("Invalid reproducible disease dossier"); + return d; +} </file context> | test("RA evidence is quarantined, not approved",()=>{const x=validateRaEvidenceIntake(intake);expect(x.graphPromotable).toBe(false);expect(x.status).toBe("quarantined_for_independent_review")}); | ||
| test("RA intake rejects untrusted source domains",()=>expect(()=>validateRaEvidenceIntake({...intake,source:{...intake.source,url:"https://example.com/fake"}})).toThrow()); | ||
| test("RA intake requires methods",()=>expect(()=>validateRaEvidenceIntake({...intake,study:{...intake.study,assay:""}})).toThrow()); | ||
| test("dossier retains reproducible methods and dataset digest",()=>expect(validateDiseaseDossier(dossier).dataset.sha256).toHaveLength(64)); |
There was a problem hiding this comment.
P2: This test does not cover the reproducibility contract it names. Assert the returned method metadata and add invalid-method/invalid-digest cases so the validator cannot regress to checking length alone.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At test/raEvidenceDossier.test.ts, line 8: <comment>This test does not cover the reproducibility contract it names. Assert the returned method metadata and add invalid-method/invalid-digest cases so the validator cannot regress to checking length alone.</comment> <file context> @@ -0,0 +1,10 @@ +test("RA evidence is quarantined, not approved",()=>{const x=validateRaEvidenceIntake(intake);expect(x.graphPromotable).toBe(false);expect(x.status).toBe("quarantined_for_independent_review")}); +test("RA intake rejects untrusted source domains",()=>expect(()=>validateRaEvidenceIntake({...intake,source:{...intake.source,url:"https://example.com/fake"}})).toThrow()); +test("RA intake requires methods",()=>expect(()=>validateRaEvidenceIntake({...intake,study:{...intake.study,assay:""}})).toThrow()); +test("dossier retains reproducible methods and dataset digest",()=>expect(validateDiseaseDossier(dossier).dataset.sha256).toHaveLength(64)); +test("dossier cannot mark graph as promotable",()=>expect(()=>validateDiseaseDossier({...dossier,graphPromotable:true as false})).toThrow()); +test("dossier cannot include PHI",()=>expect(()=>validateDiseaseDossier({...dossier,containsPhi:true as false})).toThrow()); </file context> | export type RaIntakeResult={schemaVersion:"hsi-ra-intake-1";status:"quarantined_for_independent_review";disease:"rheumatoid_arthritis";intakeId:string;sourcePmid:string;datasetVersion:string;proposedRelationshipCount:number;reviewRequirements:string[];graphPromotable:false;containsPhi:false}; | ||
| const id=/^[A-Za-z0-9][A-Za-z0-9._:-]{1,127}$/; | ||
| export function validateRaEvidenceIntake(x:RaEvidenceIntake):RaIntakeResult{ | ||
| if(!x||x.disease!=="rheumatoid_arthritis"||!id.test(x.id)||!id.test(x.datasetVersion)||!id.test(x.submittedBy)||!/^\d{6,9}$/.test(x.source?.pmid)||!/^https:\/\/(pubmed\.ncbi\.nlm\.nih\.gov|europepmc\.org)\//.test(x.source?.url)||!["permitted","unknown","restricted"].includes(x.source?.licence)||!Number.isInteger(x.citation?.publicationYear)||x.citation.publicationYear<1900||x.citation.publicationYear>2100||Number.isNaN(Date.parse(x.citation?.retrievedAt)))throw Error("Invalid RA evidence intake metadata"); |
There was a problem hiding this comment.
P2: RegExp.test coerces its argument, so non-string JSON values such as numeric pmid or array id pass validation. Add typeof string checks before the regex tests so the strict contract rejects them.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/raEvidenceDossier.ts, line 8: <comment>RegExp.test coerces its argument, so non-string JSON values such as numeric `pmid` or array `id` pass validation. Add `typeof` string checks before the regex tests so the strict contract rejects them.</comment> <file context> @@ -0,0 +1,18 @@ +export type RaIntakeResult={schemaVersion:"hsi-ra-intake-1";status:"quarantined_for_independent_review";disease:"rheumatoid_arthritis";intakeId:string;sourcePmid:string;datasetVersion:string;proposedRelationshipCount:number;reviewRequirements:string[];graphPromotable:false;containsPhi:false}; +const id=/^[A-Za-z0-9][A-Za-z0-9._:-]{1,127}$/; +export function validateRaEvidenceIntake(x:RaEvidenceIntake):RaIntakeResult{ + if(!x||x.disease!=="rheumatoid_arthritis"||!id.test(x.id)||!id.test(x.datasetVersion)||!id.test(x.submittedBy)||!/^\d{6,9}$/.test(x.source?.pmid)||!/^https:\/\/(pubmed\.ncbi\.nlm\.nih\.gov|europepmc\.org)\//.test(x.source?.url)||!["permitted","unknown","restricted"].includes(x.source?.licence)||!Number.isInteger(x.citation?.publicationYear)||x.citation.publicationYear<1900||x.citation.publicationYear>2100||Number.isNaN(Date.parse(x.citation?.retrievedAt)))throw Error("Invalid RA evidence intake metadata"); + const fields=[x.citation.title,x.study?.population,x.study?.specimen,x.study?.assay,x.study?.diseaseStage,x.study?.sourceLocator]; + if(fields.some(v=>typeof v!=="string"||!v.trim()||v.length>2000)||!Array.isArray(x.proposedRelationships)||x.proposedRelationships.length>100)throw Error("Incomplete study methods or unbounded claims"); </file context> | } | ||
| export type ReproducibleDiseaseDossier={schemaVersion:"hsi-disease-dossier-1";investigationId:string;disease:"systemic_sclerosis"|"rheumatoid_arthritis";dataset:{id:string;version:string;sha256:string};analysis:{method:string;methodVersion:string;parameters:Record<string,string>;codeCommit:string;executedAt:string};evidenceIntakeIds:string[];findings:Array<{id:string;description:string;sourceEvidenceIds:string[];classification:"association"|"computational_inference"|"unvalidated_hypothesis"}>;review:{state:"draft"|"in_review";reviewerDecisionId:null};graphPromotable:false;containsPhi:false}; | ||
| export function validateDiseaseDossier(d:ReproducibleDiseaseDossier):ReproducibleDiseaseDossier{ | ||
| if(!d||d.schemaVersion!=="hsi-disease-dossier-1"||!id.test(d.investigationId)||!["systemic_sclerosis","rheumatoid_arthritis"].includes(d.disease)||!id.test(d.dataset?.id)||!id.test(d.dataset?.version)||! /^[a-f0-9]{64}$/i.test(d.dataset?.sha256)||!d.analysis?.method?.trim()||!id.test(d.analysis?.methodVersion)||!id.test(d.analysis?.codeCommit)||Number.isNaN(Date.parse(d.analysis?.executedAt))||!d.analysis.parameters||Object.keys(d.analysis.parameters).length>100||Object.entries(d.analysis.parameters).some(([k,v])=>!id.test(k)||typeof v!=="string"||v.length>500)||!Array.isArray(d.evidenceIntakeIds)||d.evidenceIntakeIds.length>500||d.evidenceIntakeIds.some(x=>!id.test(x))||!Array.isArray(d.findings)||d.findings.length>500||d.findings.some(f=>!id.test(f.id)||!f.description?.trim()||!Array.isArray(f.sourceEvidenceIds)||f.sourceEvidenceIds.some(x=>!id.test(x))||!["association","computational_inference","unvalidated_hypothesis"].includes(f.classification))||!["draft","in_review"].includes(d.review?.state)||d.review.reviewerDecisionId!==null||d.graphPromotable!==false||d.containsPhi!==false)throw Error("Invalid reproducible disease dossier"); |
There was a problem hiding this comment.
P2: The intake and dossier validators accept ambiguous or normalized date strings as reproducibility timestamps. Require the repository’s strict timestamp format, not just a successful Date.parse.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/raEvidenceDossier.ts, line 16: <comment>The intake and dossier validators accept ambiguous or normalized date strings as reproducibility timestamps. Require the repository’s strict timestamp format, not just a successful `Date.parse`.</comment> <file context> @@ -0,0 +1,18 @@ +} +export type ReproducibleDiseaseDossier={schemaVersion:"hsi-disease-dossier-1";investigationId:string;disease:"systemic_sclerosis"|"rheumatoid_arthritis";dataset:{id:string;version:string;sha256:string};analysis:{method:string;methodVersion:string;parameters:Record<string,string>;codeCommit:string;executedAt:string};evidenceIntakeIds:string[];findings:Array<{id:string;description:string;sourceEvidenceIds:string[];classification:"association"|"computational_inference"|"unvalidated_hypothesis"}>;review:{state:"draft"|"in_review";reviewerDecisionId:null};graphPromotable:false;containsPhi:false}; +export function validateDiseaseDossier(d:ReproducibleDiseaseDossier):ReproducibleDiseaseDossier{ + if(!d||d.schemaVersion!=="hsi-disease-dossier-1"||!id.test(d.investigationId)||!["systemic_sclerosis","rheumatoid_arthritis"].includes(d.disease)||!id.test(d.dataset?.id)||!id.test(d.dataset?.version)||! /^[a-f0-9]{64}$/i.test(d.dataset?.sha256)||!d.analysis?.method?.trim()||!id.test(d.analysis?.methodVersion)||!id.test(d.analysis?.codeCommit)||Number.isNaN(Date.parse(d.analysis?.executedAt))||!d.analysis.parameters||Object.keys(d.analysis.parameters).length>100||Object.entries(d.analysis.parameters).some(([k,v])=>!id.test(k)||typeof v!=="string"||v.length>500)||!Array.isArray(d.evidenceIntakeIds)||d.evidenceIntakeIds.length>500||d.evidenceIntakeIds.some(x=>!id.test(x))||!Array.isArray(d.findings)||d.findings.length>500||d.findings.some(f=>!id.test(f.id)||!f.description?.trim()||!Array.isArray(f.sourceEvidenceIds)||f.sourceEvidenceIds.some(x=>!id.test(x))||!["association","computational_inference","unvalidated_hypothesis"].includes(f.classification))||!["draft","in_review"].includes(d.review?.state)||d.review.reviewerDecisionId!==null||d.graphPromotable!==false||d.containsPhi!==false)throw Error("Invalid reproducible disease dossier"); + return d; +} </file context> | /** Phase 4 RA evidence intake and reproducible research dossiers. | ||
| * Intake is a quarantine stage: source identifiers are not scientific validation. | ||
| */ | ||
| export type RaEvidenceIntake={id:string;disease:"rheumatoid_arthritis";source:{pmid:string;doi:string|null;url:string;licence:"permitted"|"unknown"|"restricted"};citation:{title:string;publicationYear:number;retrievedAt:string};study:{population:string;specimen:string;assay:string;diseaseStage:string;sourceLocator:string};proposedRelationships:Array<{subjectId:string;predicate:string;objectId:string;interpretation:string}>;datasetVersion:string;submittedBy:string}; |
There was a problem hiding this comment.
P2: The new intake and dossier APIs are inaccessible through the package entry point because this module is not re-exported. Add the module’s types and validators to src/index.ts (and a package subpath if that is the intended API).
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/raEvidenceDossier.ts, line 4: <comment>The new intake and dossier APIs are inaccessible through the package entry point because this module is not re-exported. Add the module’s types and validators to `src/index.ts` (and a package subpath if that is the intended API).</comment> <file context> @@ -0,0 +1,18 @@ +/** Phase 4 RA evidence intake and reproducible research dossiers. + * Intake is a quarantine stage: source identifiers are not scientific validation. + */ +export type RaEvidenceIntake={id:string;disease:"rheumatoid_arthritis";source:{pmid:string;doi:string|null;url:string;licence:"permitted"|"unknown"|"restricted"};citation:{title:string;publicationYear:number;retrievedAt:string};study:{population:string;specimen:string;assay:string;diseaseStage:string;sourceLocator:string};proposedRelationships:Array<{subjectId:string;predicate:string;objectId:string;interpretation:string}>;datasetVersion:string;submittedBy:string}; +export type RaIntakeResult={schemaVersion:"hsi-ra-intake-1";status:"quarantined_for_independent_review";disease:"rheumatoid_arthritis";intakeId:string;sourcePmid:string;datasetVersion:string;proposedRelationshipCount:number;reviewRequirements:string[];graphPromotable:false;containsPhi:false}; +const id=/^[A-Za-z0-9][A-Za-z0-9._:-]{1,127}$/; </file context> | } | ||
| export type ReproducibleDiseaseDossier={schemaVersion:"hsi-disease-dossier-1";investigationId:string;disease:"systemic_sclerosis"|"rheumatoid_arthritis";dataset:{id:string;version:string;sha256:string};analysis:{method:string;methodVersion:string;parameters:Record<string,string>;codeCommit:string;executedAt:string};evidenceIntakeIds:string[];findings:Array<{id:string;description:string;sourceEvidenceIds:string[];classification:"association"|"computational_inference"|"unvalidated_hypothesis"}>;review:{state:"draft"|"in_review";reviewerDecisionId:null};graphPromotable:false;containsPhi:false}; | ||
| export function validateDiseaseDossier(d:ReproducibleDiseaseDossier):ReproducibleDiseaseDossier{ | ||
| if(!d||d.schemaVersion!=="hsi-disease-dossier-1"||!id.test(d.investigationId)||!["systemic_sclerosis","rheumatoid_arthritis"].includes(d.disease)||!id.test(d.dataset?.id)||!id.test(d.dataset?.version)||! /^[a-f0-9]{64}$/i.test(d.dataset?.sha256)||!d.analysis?.method?.trim()||!id.test(d.analysis?.methodVersion)||!id.test(d.analysis?.codeCommit)||Number.isNaN(Date.parse(d.analysis?.executedAt))||!d.analysis.parameters||Object.keys(d.analysis.parameters).length>100||Object.entries(d.analysis.parameters).some(([k,v])=>!id.test(k)||typeof v!=="string"||v.length>500)||!Array.isArray(d.evidenceIntakeIds)||d.evidenceIntakeIds.length>500||d.evidenceIntakeIds.some(x=>!id.test(x))||!Array.isArray(d.findings)||d.findings.length>500||d.findings.some(f=>!id.test(f.id)||!f.description?.trim()||!Array.isArray(f.sourceEvidenceIds)||f.sourceEvidenceIds.some(x=>!id.test(x))||!["association","computational_inference","unvalidated_hypothesis"].includes(f.classification))||!["draft","in_review"].includes(d.review?.state)||d.review.reviewerDecisionId!==null||d.graphPromotable!==false||d.containsPhi!==false)throw Error("Invalid reproducible disease dossier"); |
There was a problem hiding this comment.
P2: The validator accepts parameters: [] as a valid parameter record, so the returned dossier does not satisfy its own schema. Reject arrays and require a plain object before checking parameter keys and values.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/raEvidenceDossier.ts, line 16: <comment>The validator accepts `parameters: []` as a valid parameter record, so the returned dossier does not satisfy its own schema. Reject arrays and require a plain object before checking parameter keys and values.</comment> <file context> @@ -0,0 +1,18 @@ +} +export type ReproducibleDiseaseDossier={schemaVersion:"hsi-disease-dossier-1";investigationId:string;disease:"systemic_sclerosis"|"rheumatoid_arthritis";dataset:{id:string;version:string;sha256:string};analysis:{method:string;methodVersion:string;parameters:Record<string,string>;codeCommit:string;executedAt:string};evidenceIntakeIds:string[];findings:Array<{id:string;description:string;sourceEvidenceIds:string[];classification:"association"|"computational_inference"|"unvalidated_hypothesis"}>;review:{state:"draft"|"in_review";reviewerDecisionId:null};graphPromotable:false;containsPhi:false}; +export function validateDiseaseDossier(d:ReproducibleDiseaseDossier):ReproducibleDiseaseDossier{ + if(!d||d.schemaVersion!=="hsi-disease-dossier-1"||!id.test(d.investigationId)||!["systemic_sclerosis","rheumatoid_arthritis"].includes(d.disease)||!id.test(d.dataset?.id)||!id.test(d.dataset?.version)||! /^[a-f0-9]{64}$/i.test(d.dataset?.sha256)||!d.analysis?.method?.trim()||!id.test(d.analysis?.methodVersion)||!id.test(d.analysis?.codeCommit)||Number.isNaN(Date.parse(d.analysis?.executedAt))||!d.analysis.parameters||Object.keys(d.analysis.parameters).length>100||Object.entries(d.analysis.parameters).some(([k,v])=>!id.test(k)||typeof v!=="string"||v.length>500)||!Array.isArray(d.evidenceIntakeIds)||d.evidenceIntakeIds.length>500||d.evidenceIntakeIds.some(x=>!id.test(x))||!Array.isArray(d.findings)||d.findings.length>500||d.findings.some(f=>!id.test(f.id)||!f.description?.trim()||!Array.isArray(f.sourceEvidenceIds)||f.sourceEvidenceIds.some(x=>!id.test(x))||!["association","computational_inference","unvalidated_hypothesis"].includes(f.classification))||!["draft","in_review"].includes(d.review?.state)||d.review.reviewerDecisionId!==null||d.graphPromotable!==false||d.containsPhi!==false)throw Error("Invalid reproducible disease dossier"); + return d; +} </file context> | } | ||
| export type ReproducibleDiseaseDossier={schemaVersion:"hsi-disease-dossier-1";investigationId:string;disease:"systemic_sclerosis"|"rheumatoid_arthritis";dataset:{id:string;version:string;sha256:string};analysis:{method:string;methodVersion:string;parameters:Record<string,string>;codeCommit:string;executedAt:string};evidenceIntakeIds:string[];findings:Array<{id:string;description:string;sourceEvidenceIds:string[];classification:"association"|"computational_inference"|"unvalidated_hypothesis"}>;review:{state:"draft"|"in_review";reviewerDecisionId:null};graphPromotable:false;containsPhi:false}; | ||
| export function validateDiseaseDossier(d:ReproducibleDiseaseDossier):ReproducibleDiseaseDossier{ | ||
| if(!d||d.schemaVersion!=="hsi-disease-dossier-1"||!id.test(d.investigationId)||!["systemic_sclerosis","rheumatoid_arthritis"].includes(d.disease)||!id.test(d.dataset?.id)||!id.test(d.dataset?.version)||! /^[a-f0-9]{64}$/i.test(d.dataset?.sha256)||!d.analysis?.method?.trim()||!id.test(d.analysis?.methodVersion)||!id.test(d.analysis?.codeCommit)||Number.isNaN(Date.parse(d.analysis?.executedAt))||!d.analysis.parameters||Object.keys(d.analysis.parameters).length>100||Object.entries(d.analysis.parameters).some(([k,v])=>!id.test(k)||typeof v!=="string"||v.length>500)||!Array.isArray(d.evidenceIntakeIds)||d.evidenceIntakeIds.length>500||d.evidenceIntakeIds.some(x=>!id.test(x))||!Array.isArray(d.findings)||d.findings.length>500||d.findings.some(f=>!id.test(f.id)||!f.description?.trim()||!Array.isArray(f.sourceEvidenceIds)||f.sourceEvidenceIds.some(x=>!id.test(x))||!["association","computational_inference","unvalidated_hypothesis"].includes(f.classification))||!["draft","in_review"].includes(d.review?.state)||d.review.reviewerDecisionId!==null||d.graphPromotable!==false||d.containsPhi!==false)throw Error("Invalid reproducible disease dossier"); |
There was a problem hiding this comment.
P2: A dossier with no evidence references currently validates successfully, contradicting the requirement that dossiers retain evidence references. Reject an empty evidenceIntakeIds list and empty sourceEvidenceIds lists for findings.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/raEvidenceDossier.ts, line 16: <comment>A dossier with no evidence references currently validates successfully, contradicting the requirement that dossiers retain evidence references. Reject an empty `evidenceIntakeIds` list and empty `sourceEvidenceIds` lists for findings.</comment> <file context> @@ -0,0 +1,18 @@ +} +export type ReproducibleDiseaseDossier={schemaVersion:"hsi-disease-dossier-1";investigationId:string;disease:"systemic_sclerosis"|"rheumatoid_arthritis";dataset:{id:string;version:string;sha256:string};analysis:{method:string;methodVersion:string;parameters:Record<string,string>;codeCommit:string;executedAt:string};evidenceIntakeIds:string[];findings:Array<{id:string;description:string;sourceEvidenceIds:string[];classification:"association"|"computational_inference"|"unvalidated_hypothesis"}>;review:{state:"draft"|"in_review";reviewerDecisionId:null};graphPromotable:false;containsPhi:false}; +export function validateDiseaseDossier(d:ReproducibleDiseaseDossier):ReproducibleDiseaseDossier{ + if(!d||d.schemaVersion!=="hsi-disease-dossier-1"||!id.test(d.investigationId)||!["systemic_sclerosis","rheumatoid_arthritis"].includes(d.disease)||!id.test(d.dataset?.id)||!id.test(d.dataset?.version)||! /^[a-f0-9]{64}$/i.test(d.dataset?.sha256)||!d.analysis?.method?.trim()||!id.test(d.analysis?.methodVersion)||!id.test(d.analysis?.codeCommit)||Number.isNaN(Date.parse(d.analysis?.executedAt))||!d.analysis.parameters||Object.keys(d.analysis.parameters).length>100||Object.entries(d.analysis.parameters).some(([k,v])=>!id.test(k)||typeof v!=="string"||v.length>500)||!Array.isArray(d.evidenceIntakeIds)||d.evidenceIntakeIds.length>500||d.evidenceIntakeIds.some(x=>!id.test(x))||!Array.isArray(d.findings)||d.findings.length>500||d.findings.some(f=>!id.test(f.id)||!f.description?.trim()||!Array.isArray(f.sourceEvidenceIds)||f.sourceEvidenceIds.some(x=>!id.test(x))||!["association","computational_inference","unvalidated_hypothesis"].includes(f.classification))||!["draft","in_review"].includes(d.review?.state)||d.review.reviewerDecisionId!==null||d.graphPromotable!==false||d.containsPhi!==false)throw Error("Invalid reproducible disease dossier"); + return d; +} </file context> | export type RaIntakeResult={schemaVersion:"hsi-ra-intake-1";status:"quarantined_for_independent_review";disease:"rheumatoid_arthritis";intakeId:string;sourcePmid:string;datasetVersion:string;proposedRelationshipCount:number;reviewRequirements:string[];graphPromotable:false;containsPhi:false}; | ||
| const id=/^[A-Za-z0-9][A-Za-z0-9._:-]{1,127}$/; | ||
| export function validateRaEvidenceIntake(x:RaEvidenceIntake):RaIntakeResult{ | ||
| if(!x||x.disease!=="rheumatoid_arthritis"||!id.test(x.id)||!id.test(x.datasetVersion)||!id.test(x.submittedBy)||!/^\d{6,9}$/.test(x.source?.pmid)||!/^https:\/\/(pubmed\.ncbi\.nlm\.nih\.gov|europepmc\.org)\//.test(x.source?.url)||!["permitted","unknown","restricted"].includes(x.source?.licence)||!Number.isInteger(x.citation?.publicationYear)||x.citation.publicationYear<1900||x.citation.publicationYear>2100||Number.isNaN(Date.parse(x.citation?.retrievedAt)))throw Error("Invalid RA evidence intake metadata"); |
There was a problem hiding this comment.
P2: This validator accepts a malformed DOI and a URL for a different PMID, so the intake's source identity can describe two different articles. Validate a non-null DOI and require the canonical URL identifier to match source.pmid before returning the quarantined result.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/raEvidenceDossier.ts, line 8: <comment>This validator accepts a malformed DOI and a URL for a different PMID, so the intake's source identity can describe two different articles. Validate a non-null DOI and require the canonical URL identifier to match `source.pmid` before returning the quarantined result.</comment> <file context> @@ -0,0 +1,18 @@ +export type RaIntakeResult={schemaVersion:"hsi-ra-intake-1";status:"quarantined_for_independent_review";disease:"rheumatoid_arthritis";intakeId:string;sourcePmid:string;datasetVersion:string;proposedRelationshipCount:number;reviewRequirements:string[];graphPromotable:false;containsPhi:false}; +const id=/^[A-Za-z0-9][A-Za-z0-9._:-]{1,127}$/; +export function validateRaEvidenceIntake(x:RaEvidenceIntake):RaIntakeResult{ + if(!x||x.disease!=="rheumatoid_arthritis"||!id.test(x.id)||!id.test(x.datasetVersion)||!id.test(x.submittedBy)||!/^\d{6,9}$/.test(x.source?.pmid)||!/^https:\/\/(pubmed\.ncbi\.nlm\.nih\.gov|europepmc\.org)\//.test(x.source?.url)||!["permitted","unknown","restricted"].includes(x.source?.licence)||!Number.isInteger(x.citation?.publicationYear)||x.citation.publicationYear<1900||x.citation.publicationYear>2100||Number.isNaN(Date.parse(x.citation?.retrievedAt)))throw Error("Invalid RA evidence intake metadata"); + const fields=[x.citation.title,x.study?.population,x.study?.specimen,x.study?.assay,x.study?.diseaseStage,x.study?.sourceLocator]; + if(fields.some(v=>typeof v!=="string"||!v.trim()||v.length>2000)||!Array.isArray(x.proposedRelationships)||x.proposedRelationships.length>100)throw Error("Incomplete study methods or unbounded claims"); </file context> gnaneshwer23 commented Nov 13, 2026
Closing after review. Superseded by main. Intake quarantine is covered by evidence/governedEvidenceStaging.ts, the evidence ledger and source clearance; reproducibility hashes are covered by the context audit archive. The code here is hard-coded to rheumatoid_arthritis and systemic_sclerosis. The branch is left in place. Closed during the 13 Nov 2026 backlog review (verified against origin/main). 🤖 Generated with Claude Code |
Introduces strict read-only contract validation for rheumatoid arthritis literature intake, source identity, study methods, proposed graph relationships and independent review requirements. All intake remains quarantined; no source content is automatically verified or graph-promoted. Adds reproducible research dossier contract with dataset SHA-256, method version, parameters, code commit, execution time, evidence references and draft review status. Six tests cover validation and governance. Does NOT ingest actual RA publications, persist dossiers, fetch PubMed or claim a live workflow; those are subsequent integrations. Separate PR #60 is currently conflicted and not merged. CI required before merge.
Summary by Sourcery
Establish quarantined RA evidence intake and reproducible research dossier foundations without automated verification or graph promotion.
New Features:
Enhancements:
Tests:
Summary by cubic
Adds contract validation for rheumatoid arthritis evidence intake and a reproducible dossier foundation. Intake is strictly quarantined: no source content is verified or promoted to the graph.
Written for commit d5b701d. Summary will update on new commits.