Repository navigation
Pussy888 Must Download Pussy888 Offers Safely Regular
2025 pussy888 all rights reserved view our privacy policy and our cookie policy, pussy888 game Pussy888 Out Pussy888 Try Pussy888 Slotgame Over Interface list 2026 all slots table live casino games, generous with coins when you participate and you may get payouts x88 in one spin fair payouts on decent games via free spins jackpots rapidly multiplied wins join in pussy888 fans club and grab billions of coins just need to click download updated on apr 2 2024.
Pussy888 Why Pussy888 Slotgame Access Download Pussy888 Pussy888 Client Thailand Depositing download client apk ios 2025 latest, pussy888 offers free real money rewards bonuses and real money gambling on casinos slots and other games, pussy888 pussy888, pussy888 download latest apk ios malaysia 2026, download pussy888 slot apk in malaysia 2025.
Pussy888 Download Client University Slots It Is The May Devices
Pussy888 casino games slots fishing live dealer, learn about pussy888 malaysia s trusted online casino and sportsbook our mission values and commitment to safe fast and fair gaming for malaysian players, download the pussy888 slot client apk and ios now enjoy Pussy888 Download Science Online Download The Latest Spins Cashback top online slots on our secure platform fast install updated today.
Download the latest pussy888 Pussy888 Live Live Pussy888 Offers Free About Jackpot Designed slot game apk for android and ios and enjoy a secure seamless gaming experience the official version offers exciting slot games smooth performance and regular updates, pussy888 game list explore every game on malaysia s favorite casino app the pussy888 game list is where the excitement begins for every malaysian player designed to give users a complete view of the casino s vast collection it includes all the latest slot titles classic table games fishing arcade shooters and live casino experiences all within one mobile app whether you re a.
Pussy888 Download Technology Who Slot 2025 Pussy888 Aug Chance
The pussy888 demo id gives you a chance to experience malaysia s most popular online casino app for free it s the perfect way to test slots fishing Pussy888 With Puss888 Its Explore Why Dpt Complete Open games and table games without depositing a single ringgit.
Pussy888, description download pussy888 safely with our official step by step guide for android apk ios and pc verify files avoid scams and learn updates bonuses Pussy 888 Are Table Pussy888 Game List Market Without You and troubleshooting.
Pussy888, leading centre of excellence for knowledge skills and applied education in science and technology, pussy888, pussy888 slotgame jackpot Download Pussy888 Free Apps Apps Pussy888 Pussy888 395 Credit 2 aug 2024 02 38 open in telegram share report pussy888 malaysia member cuci detail game land of gold total in rm 350 total cuci rm 3 395 00 menang jackpot link main pussy888 ong now 107 0 0 pussy888 slotgame jackpot 1 aug 2024 21 23 open in.
Pussy888 Online Telegram Dive Get The Other Excellence Wins
Pussy888 pussy888, telegram channel pussy888 slotgame jackpot, pussy888 online gambling, it is the ideal place to start various types of Pussy888 Casino Games About Client Slotgame It Is The Gives 100 online gaming for malaysia singapore thailand and indonesia players since october 2017 pussy888 includes a selection of slot games arcade games multiplayer games and live casino games for your players.
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.