@skyramp/testbot-core 0.12.0-v3.27 → 0.12.0-v3.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/main.js +235 -235
  2. package/dist/post.js +2 -2
  3. package/package.json +1 -1
package/dist/post.js CHANGED
@@ -212,11 +212,11 @@ ${o?Ar().abandonedBody:Ar().cancelledBody}
212
212
  ${s.join(`
213
213
  `)}
214
214
 
215
- <sub>[${Ar().workflowRunLinkLabel}](${e})</sub>`}r0();r0();r0();ay();function gU(t,e){if(process.env.GITHUB_ACTIONS)return new oh(t,aue,e);throw new Error("Unrecognized CI environment. Set GITHUB_ACTIONS=true for GitHub Actions, or use EvalPlatform directly for eval/testing.")}at();var n0=(r=>(r.Sufficient="sufficient",r.Insufficient="insufficient",r))(n0||{}),yU=(d=>(d.RelatedChangeConflict="related_change_conflict",d.ReferenceOutsideTarget="reference_outside_target",d.SourceAccessLost="source_access_lost",d.ConfigurationIncomplete="configuration_incomplete",d.CredentialUnavailable="credential_unavailable",d.WorkflowBindingUnverified="workflow_binding_unverified",d.WorkflowRefUnprotected="workflow_ref_unprotected",d.DeploymentReview="deployment_review",d.SutRevisionMismatch="sut_revision_mismatch",d.IsolationUnavailable="isolation_unavailable",d.EvidenceInsufficient="evidence_insufficient",d))(yU||{}),EU=(s=>(s.CiCheck="ci_check",s.TestReport="test_report",s.StaticAnalysis="static_analysis",s.CodeReview="code_review",s.Other="other",s))(EU||{}),bU=(n=>(n.Application="application",n.Environment="environment",n.TestDefect="test_defect",n))(bU||{}),CU=(a=>(a.AuthToken="auth_token",a.Secret="secret",a.DataConnection="data_connection",a.AppNotStarted="app_not_started",a.Login="login",a.ExternalDependency="external_dependency",a.RecordingReplay="recording_replay",a))(CU||{});var cy=(r=>(r.Ready="ready",r.Blocked="blocked",r))(cy||{}),Fs=S.string().trim().min(1),v4e=S.object({name:Fs,repository:Fs.describe("owner/repo of the repository the component is built from"),healthy:S.boolean()}),k4e=S.object({component:Fs,problem:Fs,evidence:Fs.describe("the exact command and output that shows it"),fix:Fs.describe("what the user must provide, and where")}),_4e=S.object({framework:Fs,file:Fs.describe("the test file run, relative to its repository root"),result:S.enum(["pass","fail","error"])}),P4e=S.object({input:Fs.describe("the part of the user's SUT input, as given"),reason:Fs}),lue=S.object({schemaVersion:S.literal(1),status:S.nativeEnum(cy).describe("ready only if every component came up healthy and the recipe is written"),components:S.array(v4e),suites:S.array(_4e).default([]).describe("one run per test suite the Target's repositories have; empty when they have none"),inputsUsed:S.array(Fs).default([]).describe("the parts of the user's SUT input the recipe used"),inputsNotUsed:S.array(P4e).default([]).describe("the parts it did not use, and why"),blockers:S.array(k4e).describe("required (non-empty) when status is blocked")});var ly=64*1024,uy=512*1024,wU=/[\u0000-\u0008\u000b\u000e-\u001f\u007f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/;var uue=Ae(require("path"));var IU=(i=>(i.Clean="clean",i.RecipeDrift="recipe-drift",i.ChangeBrokeBringup="change-broke-bringup",i.BringupFailed="bringup-failed",i))(IU||{}),fl=S.string().trim().min(1),D4e=S.object({url:S.string().optional().describe("the URL probed, if the check is an HTTP request"),command:S.string().optional().describe("the command run, if the check is a script \u2014 preferred when auth is needed"),headers:S.record(S.string()).optional(),status:S.union([S.number(),S.string()]).optional().describe("expected HTTP status for a url check (default 200)"),output:fl.describe("what the check returned, VERBATIM \u2014 the bytes, nothing appended; this gate RE-RUNS the check")}),G0t=S.object({schemaVersion:S.literal(1),baseUrls:S.record(S.string()).optional().describe("service \u2192 base URL of the running app; omit on a failed bring-up, never invent one"),health:D4e.optional(),teardown:fl.describe("command that tears the SUT down"),dependencies:S.record(S.boolean()).optional().describe("EVERY backing service: true = really deployed, false = mocked; REQUIRED when the app came up"),outcome:S.nativeEnum(IU).describe("clean | recipe-drift (you corrected the recipe) | change-broke-bringup (the PR broke it) | bringup-failed (environment, not the PR)"),recipeFixes:S.array(S.string()).optional().describe("required when outcome is recipe-drift: what was corrected"),bringupError:S.object({command:fl,output:fl}).optional().describe("required when bring-up failed: the exact failing command and what it printed"),suspectFiles:S.array(S.string()).optional().describe("required for change-broke-bringup: files THIS PR changed that the failure points at, relative to your working directory (a file in another checkout of the run: its absolute path)"),seeded:S.boolean(),startedAt:fl.describe("ISO timestamp"),revisions:S.array(S.object({component:fl.describe("a shared component listed above"),url:fl.describe("the URL on the component's own origin (scheme, host and port) that answers with its deployed commit"),output:fl.describe("what the URL returned, VERBATIM; this gate FETCHES each url")})).optional().describe("only when shared components are listed above: one check per component whose deployed commit you found")});var Si=S.string().trim().min(1),due=S.object({schemaVersion:S.literal(1),status:S.enum(["ready","blocked"]),components:S.array(S.object({name:Si,repository:Si.describe("owner/repo"),healthy:S.boolean(),url:S.string().min(1).nullable()}).strict()),suites:S.array(S.object({framework:Si,file:Si,result:S.enum(["pass","fail","error"])}).strict()),inputsUsed:S.array(Si),inputsNotUsed:S.array(S.object({input:Si,reason:Si}).strict()),blockers:S.array(S.object({component:Si,problem:Si,evidence:Si,fix:Si}).strict()),replay:S.object({outcome:Si,durationSeconds:S.number().nonnegative().nullable()}).strict().nullable(),files:S.array(S.object({path:Si,content:S.string()}).strict())}).strict(),$0t=["clean","recipe-drift"];function i0(t){let e=uue.posix.normalize(t);return e===t&&(e===".skyramp/workspace.yml"||e.startsWith(".skyramp/sut/")&&e.length>13)}var o0=(e=>(e.GitHub="github",e))(o0||{}),SU=(s=>(s.Trigger="TRIGGER",s.Baseline="BASELINE",s.AuthoritativeRelatedChange="AUTHORITATIVE_RELATED_CHANGE",s.ConfiguredSharedDependency="CONFIGURED_SHARED_DEPENDENCY",s.ManualOverride="MANUAL_OVERRIDE",s))(SU||{}),a0=(s=>(s.PullRequest="pull_request",s.ReadyForReview="ready_for_review",s.Schedule="schedule",s.Manual="manual",s.SutSetup="sut_setup",s))(a0||{}),M4e=["sut_setup"],F4e=["sut_setup","schedule"];var RU=(e=>(e.PullRequest="pull_request",e))(RU||{}),c0=(i=>(i.ModelProvider="model_provider",i.SutAccess="sut_access",i.Skyramp="skyramp",i.Other="other",i))(c0||{});var l0=(i=>(i.ReportUploaded="report_uploaded",i.NoReport="no_report",i.Cancelled="cancelled",i.RecipeUploaded="recipe_uploaded",i))(l0||{}),fue=(r=>(r.Running="running",r.Ended="ended",r))(fue||{}),u0=(s=>(s.TimedOut="timed_out",s.AgentFailed="agent_failed",s.SetupFailed="setup_failed",s.CredentialMissing="credential_missing",s.RunnerLost="runner_lost",s))(u0||{}),TU=(r=>(r.Onboard="onboard",r.Deploy="deploy",r))(TU||{}),NU=(r=>(r.Started="started",r.Finished="finished",r))(NU||{}),QU=(n=>(n.Passed="passed",n.Failed="failed",n.Skipped="skipped",n))(QU||{}),hl=S.string().regex(/^[1-9][0-9]{0,18}$/),dy=S.string().regex(/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/),Wa=S.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),ah=S.string().regex(/^[0-9a-f]{64}$/),s0=S.object({id:Wa,revision:hl}).strict(),Ls=S.object({provider:S.nativeEnum(o0),providerAccountId:hl,providerRepositoryId:hl}).strict(),xU=t=>`${t.provider}:${t.providerRepositoryId}`,hue=Ls.extend({namespace:S.string().min(1),name:S.string().min(1)}).strict(),L4e=S.object({repository:hue,revision:dy,ref:S.string().nullable(),reason:S.nativeEnum(SU),change:S.object({kind:S.nativeEnum(RU),number:hl,base:S.object({ref:S.string().min(1),revision:dy}).strict().optional()}).strict().nullable()}).strict();function O4e(t){let e=t.baseline.sources,r=t.trigger.kind==="schedule"&&t.baseline.confirmedRunId!==null;if(!e)return r?"names every source of the snapshot, once":null;if(t.trigger.kind!=="schedule")return"only a scheduled run names Confirmed Baseline sources";if(t.baseline.confirmedRunId===null)return"a run with no Confirmed Baseline names no baseline sources";let n=new Set(t.sources.map(o=>xU(o.repository))),i=new Set(e.map(o=>xU(o.repository)));return i.size===e.length&&i.size===n.size&&[...i].every(o=>n.has(o))?null:"names every source of the snapshot, once"}var U4e=S.object({schemaVersion:S.literal(1),runId:Wa,skyrampOrgId:Wa,target:s0,policy:s0.nullable(),trigger:S.object({kind:S.nativeEnum(a0),requestedAt:S.string().datetime()}).strict(),configuration:S.object({captureId:Wa,revision:hl.nullable(),hash:ah}).strict(),baseline:S.object({confirmedRunId:Wa.nullable(),sources:S.array(S.object({repository:Ls,revision:dy}).strict()).optional()}).strict(),sources:S.array(L4e).min(1),execution:S.object({provider:S.nativeEnum(o0),repository:hue,workflowPath:S.string(),ref:S.string()}).strict(),credentials:S.array(S.object({name:S.string(),purpose:S.nativeEnum(c0),required:S.boolean()}).strict())}).strict().superRefine((t,e)=>{let r=t.trigger.kind,n=M4e.includes(r);n!==(t.policy===null)&&e.addIssue({code:S.ZodIssueCode.custom,path:["policy"],message:n?`a ${r} run has no policy`:"names the policy revision"});let i=O4e(t);i&&e.addIssue({code:S.ZodIssueCode.custom,path:["baseline","sources"],message:i}),F4e.includes(r)&&t.sources.forEach((s,o)=>{s.reason!=="BASELINE"&&e.addIssue({code:S.ZodIssueCode.custom,path:["sources",o,"reason"],message:`a ${r} run selects only BASELINE sources`})})});var X0t=S.object({schemaVersion:S.literal(1),attempt:S.object({id:Wa,number:S.number().int().positive(),deadlineAt:S.string().datetime()}).strict(),manifest:U4e,manifestHash:ah,entitlements:S.array(S.string()).optional(),runToken:S.string().min(1).optional()}).strict(),eSt=S.object({schemaVersion:S.literal(1),runId:Wa,execution:S.object({provider:S.nativeEnum(o0),repository:Ls,providerRunId:hl,providerRunAttempt:S.number().int().positive(),workflowRef:S.string().min(1)}).strict()}).strict(),pue=S.object({repository:Ls,number:hl}).strict(),q4e=S.discriminatedUnion("status",[S.object({status:S.literal("none")}).strict(),S.object({status:S.literal("delivered"),pullRequests:S.array(pue).min(1)}).strict(),S.object({status:S.literal("partial"),pullRequests:S.array(pue).min(1),failures:S.array(S.object({repository:Ls,message:S.string()}).strict()).min(1)}).strict(),S.object({status:S.literal("failed"),message:S.string()}).strict()]),G4e=S.object({sufficiency:S.nativeEnum(n0),rationale:S.string().min(1),gaps:S.array(S.string().min(1)),acceptedEvidence:S.array(S.object({kind:S.nativeEnum(EU),repository:S.string().min(1),revision:dy,reference:S.string().min(1),summary:S.string().min(1)}).strict()),actionRequired:S.array(S.nativeEnum(yU))}).strict().superRefine((t,e)=>{t.sufficiency==="sufficient"!=(t.gaps.length===0)&&e.addIssue({code:S.ZodIssueCode.custom,path:["gaps"],message:"sufficient evidence has no gaps, and insufficient evidence names at least one"}),new Set(t.actionRequired).size!==t.actionRequired.length&&e.addIssue({code:S.ZodIssueCode.custom,path:["actionRequired"],message:"a reason appears twice"})}),BU=500,H4e=2048,z4e=1e3,V4e=S.object({testResults:S.array(S.object({resultId:S.string().regex(/^[^\u0000-\u001f]{1,512}$/),repository:S.string().regex(/^[A-Za-z0-9._-]{1,100}\/[A-Za-z0-9._-]{1,100}$/),testType:S.string(),endpoint:S.string(),status:S.enum(["Pass","Fail","Skipped"]),details:S.string(),fileName:S.string().optional(),testId:S.string().regex(/^[^\u0000-\u001f]{1,512}$/).optional(),failureCause:S.object({kind:S.nativeEnum(bU),family:S.nativeEnum(CU).optional()}).strict().optional()}).strict()),validation:G4e,changes:S.array(S.object({id:S.string().min(1).max(512),text:S.string().max(16384),source:S.string().max(H4e),testedBy:S.array(S.string().min(1).max(1024)).max(BU),writtenBy:S.array(S.string().min(1).max(1024)).max(BU),maintainedBy:S.array(S.string().min(1).max(1024)).max(BU)}).strict()).max(z4e).optional(),traceVersion:S.literal(1)}).passthrough().superRefine((t,e)=>{let r=new Set;t.testResults.forEach((n,i)=>{let s=n.failureCause;s&&n.status==="Pass"&&e.addIssue({code:S.ZodIssueCode.custom,path:["testResults",i,"failureCause"],message:"a passing result has no failure cause"}),s&&s.kind==="environment"!=(s.family!==void 0)&&e.addIssue({code:S.ZodIssueCode.custom,path:["testResults",i,"failureCause"],message:"an environment cause names its family, and no other cause does"});let o=["testResults",i,"resultId"],a=n.resultId.slice(`${n.repository}:${n.testType}:`.length);(!n.resultId.startsWith(`${n.repository}:${n.testType}:`)||a===""||a.startsWith("/")||a.startsWith("#"))&&e.addIssue({code:S.ZodIssueCode.custom,path:o,message:"is not repository:testType:path for this result"}),r.has(n.resultId)&&e.addIssue({code:S.ZodIssueCode.custom,path:o,message:"stable identity repeated"}),r.add(n.resultId)})});var Y4e=S.object({schemaVersion:S.literal(1),run:S.object({runId:Wa,attemptNumber:S.number().int().positive(),manifestHash:ah}).strict(),target:s0,policy:s0,provenance:S.object({sources:S.array(S.object({repository:Ls,revision:dy}).strict())}).strict(),delivery:S.object({generatedTests:q4e}).strict(),producer:S.object({testbot:S.string().regex(/^[0-9A-Za-z.+-]{1,64}$/),mcp:S.string().regex(/^[0-9A-Za-z.+-]{1,64}$/)}).strict(),report:V4e}).strict(),tSt=Y4e.pick({schemaVersion:!0,run:!0,target:!0,provenance:!0,producer:!0}).extend({recipe:due}).strict().superRefine(({recipe:t},e)=>{let r=(s,o)=>e.addIssue({code:S.ZodIssueCode.custom,path:["recipe",...s],message:o});t.status==="blocked"&&t.blockers.length===0&&r(["blockers"],"a blocked recipe names at least one blocker");let n=new Set,i=0;t.files.forEach((s,o)=>{i0(s.path)||r(["files",o,"path"],"is not .skyramp/workspace.yml or a file under .skyramp/sut/"),n.has(s.path)&&r(["files",o,"path"],"file repeated"),n.add(s.path),wU.test(s.content)&&r(["files",o,"content"],"is not text");let a=Buffer.byteLength(s.content,"utf8");i+=a,a>ly&&r(["files",o,"content"],`larger than ${ly} bytes`)}),i>uy&&r(["files"],`recipe text over ${uy} bytes in total`)}),$4e=S.object({schemaVersion:S.literal(1),stage:S.nativeEnum(TU),event:S.nativeEnum(NU),status:S.nativeEnum(QU).optional()}).strict().refine(t=>t.status===void 0||t.event==="finished",{path:["status"],message:"only a finished stage has a status"}),W4e=S.object({schemaVersion:S.literal(1),configuration:S.object({captureId:Wa,revision:hl.nullable(),hash:ah}).strict(),capture:S.object({schemaVersion:S.literal(1),settings:S.object({target:S.object({environment:S.unknown()}).passthrough(),timeoutMinutes:S.number().int().positive()}).passthrough(),provenance:S.object({}).passthrough(),hash:ah}).strict()}).strict(),j4e=S.object({schemaVersion:S.literal(1),runtimePlan:S.object({version:S.number().int().positive(),contentHash:ah,files:S.array(S.object({path:S.string().refine(i0,"not a recipe file path"),content:S.string()}).strict()).min(1)}).strict().nullable()}).strict(),J4e=S.object({schemaVersion:S.literal(1),state:S.nativeEnum(fue),ending:S.nativeEnum(l0).nullable(),cause:S.nativeEnum(u0).nullable(),deadlineAt:S.string().datetime()}).strict();function Aue(t){return t.reportUploaded?{schemaVersion:1,reason:"report_uploaded",cause:null}:t.recipeUploaded?{schemaVersion:1,reason:"recipe_uploaded",cause:null}:t.cancelled?{schemaVersion:1,reason:"cancelled",cause:null}:{schemaVersion:1,reason:"no_report",cause:K4e(t)}}function K4e(t){return t.credentialMissing?"credential_missing":t.setupFailed?"setup_failed":t.timedOut?"timed_out":"agent_failed"}var vU=(n=>(n.Unit="unit",n.Integration="integration",n.E2e="e2e",n))(vU||{});at();hU();ay();var mue;(function(t){t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.space=32]="space",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.asterisk=42]="asterisk",t[t.backslash=92]="backslash",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.plus=43]="plus",t[t.slash=47]="slash",t[t.formFeed=12]="formFeed",t[t.tab=9]="tab"})(mue||(mue={}));var X4e=new Array(20).fill(0).map((t,e)=>" ".repeat(e)),ch=200,e5e={" ":{"\n":new Array(ch).fill(0).map((t,e)=>`
215
+ <sub>[${Ar().workflowRunLinkLabel}](${e})</sub>`}r0();r0();r0();ay();function gU(t,e){if(process.env.GITHUB_ACTIONS)return new oh(t,aue,e);throw new Error("Unrecognized CI environment. Set GITHUB_ACTIONS=true for GitHub Actions, or use EvalPlatform directly for eval/testing.")}at();var n0=(r=>(r.Sufficient="sufficient",r.Insufficient="insufficient",r))(n0||{}),yU=(d=>(d.RelatedChangeConflict="related_change_conflict",d.ReferenceOutsideTarget="reference_outside_target",d.SourceAccessLost="source_access_lost",d.ConfigurationIncomplete="configuration_incomplete",d.CredentialUnavailable="credential_unavailable",d.WorkflowBindingUnverified="workflow_binding_unverified",d.WorkflowRefUnprotected="workflow_ref_unprotected",d.DeploymentReview="deployment_review",d.SutRevisionMismatch="sut_revision_mismatch",d.IsolationUnavailable="isolation_unavailable",d.EvidenceInsufficient="evidence_insufficient",d))(yU||{}),EU=(s=>(s.CiCheck="ci_check",s.TestReport="test_report",s.StaticAnalysis="static_analysis",s.CodeReview="code_review",s.Other="other",s))(EU||{}),bU=(n=>(n.Application="application",n.Environment="environment",n.TestDefect="test_defect",n))(bU||{}),CU=(a=>(a.AuthToken="auth_token",a.Secret="secret",a.DataConnection="data_connection",a.AppNotStarted="app_not_started",a.Login="login",a.ExternalDependency="external_dependency",a.RecordingReplay="recording_replay",a))(CU||{});var cy=(r=>(r.Ready="ready",r.Blocked="blocked",r))(cy||{}),Fs=S.string().trim().min(1),v4e=S.object({name:Fs,repository:Fs.describe("owner/repo of the repository the component is built from"),healthy:S.boolean()}),k4e=S.object({component:Fs,problem:Fs,evidence:Fs.describe("the exact command and output that shows it"),fix:Fs.describe("what the user must provide, and where")}),_4e=S.object({framework:Fs,file:Fs.describe("the test file run, relative to its repository root"),result:S.enum(["pass","fail","error"])}),P4e=S.object({input:Fs.describe("the part of the user's SUT input, as given"),reason:Fs}),lue=S.object({schemaVersion:S.literal(1),status:S.nativeEnum(cy).describe("ready only if every component came up healthy and the recipe is written"),components:S.array(v4e),suites:S.array(_4e).default([]).describe("one run per test suite the Target's repositories have; empty when they have none"),inputsUsed:S.array(Fs).default([]).describe("the parts of the user's SUT input the recipe used"),inputsNotUsed:S.array(P4e).default([]).describe("the parts it did not use, and why"),blockers:S.array(k4e).describe("required (non-empty) when status is blocked")});var ly=64*1024,uy=512*1024,wU=/[\u0000-\u0008\u000b\u000e-\u001f\u007f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/;var uue=Ae(require("path"));var IU=(i=>(i.Clean="clean",i.RecipeDrift="recipe-drift",i.ChangeBrokeBringup="change-broke-bringup",i.BringupFailed="bringup-failed",i))(IU||{}),fl=S.string().trim().min(1),D4e=S.object({url:S.string().optional().describe("the URL probed, if the check is an HTTP request"),command:S.string().optional().describe("the command run, if the check is a script \u2014 preferred when auth is needed"),headers:S.record(S.string()).optional(),status:S.union([S.number(),S.string()]).optional().describe("expected HTTP status for a url check (default 200)"),output:fl.describe("what the check returned, VERBATIM \u2014 the bytes, nothing appended; this gate RE-RUNS the check")}),G0t=S.object({schemaVersion:S.literal(1),baseUrls:S.record(S.string()).optional().describe("service \u2192 base URL of the running app; omit on a failed bring-up, never invent one"),health:D4e.optional(),teardown:fl.describe("command that tears the SUT down"),dependencies:S.record(S.boolean()).optional().describe("EVERY backing service: true = really deployed, false = mocked; REQUIRED when the app came up"),outcome:S.nativeEnum(IU).describe("clean | recipe-drift (you corrected the recipe) | change-broke-bringup (the PR broke it) | bringup-failed (environment, not the PR)"),recipeFixes:S.array(S.string()).optional().describe("required when outcome is recipe-drift: what was corrected"),bringupError:S.object({command:fl,output:fl}).optional().describe("required when bring-up failed: the exact failing command and what it printed"),suspectFiles:S.array(S.string()).optional().describe("required for change-broke-bringup: files THIS PR changed that the failure points at, relative to your working directory (a file in another checkout of the run: its absolute path)"),seeded:S.boolean(),startedAt:fl.describe("ISO timestamp"),revisions:S.array(S.object({component:fl.describe("a shared component listed above"),url:fl.describe("the URL on the component's own origin (scheme, host and port) that answers with its deployed commit"),output:fl.describe("what the URL returned, VERBATIM; this gate FETCHES each url")})).optional().describe("only when shared components are listed above: one check per component whose deployed commit you found")});var Si=S.string().trim().min(1),due=S.object({schemaVersion:S.literal(1),status:S.enum(["ready","blocked"]),components:S.array(S.object({name:Si,repository:Si.describe("owner/repo"),healthy:S.boolean(),url:S.string().min(1).nullable()}).strict()),suites:S.array(S.object({framework:Si,file:Si,result:S.enum(["pass","fail","error"])}).strict()),inputsUsed:S.array(Si),inputsNotUsed:S.array(S.object({input:Si,reason:Si}).strict()),blockers:S.array(S.object({component:Si,problem:Si,evidence:Si,fix:Si}).strict()),replay:S.object({outcome:Si,durationSeconds:S.number().nonnegative().nullable()}).strict().nullable(),files:S.array(S.object({path:Si,content:S.string()}).strict())}).strict(),$0t=["clean","recipe-drift"];function i0(t){let e=uue.posix.normalize(t);return e===t&&(e===".skyramp/workspace.yml"||e.startsWith(".skyramp/sut/")&&e.length>13)}var o0=(e=>(e.GitHub="github",e))(o0||{}),SU=(s=>(s.Trigger="TRIGGER",s.Baseline="BASELINE",s.AuthoritativeRelatedChange="AUTHORITATIVE_RELATED_CHANGE",s.ConfiguredSharedDependency="CONFIGURED_SHARED_DEPENDENCY",s.ManualOverride="MANUAL_OVERRIDE",s))(SU||{}),a0=(s=>(s.PullRequest="pull_request",s.ReadyForReview="ready_for_review",s.Schedule="schedule",s.Manual="manual",s.SutSetup="sut_setup",s))(a0||{}),M4e=["sut_setup"],F4e=["sut_setup","schedule"];var RU=(e=>(e.PullRequest="pull_request",e))(RU||{}),c0=(i=>(i.ModelProvider="model_provider",i.SutAccess="sut_access",i.Skyramp="skyramp",i.Other="other",i))(c0||{});var l0=(i=>(i.ReportUploaded="report_uploaded",i.NoReport="no_report",i.Cancelled="cancelled",i.RecipeUploaded="recipe_uploaded",i))(l0||{}),fue=(r=>(r.Running="running",r.Ended="ended",r))(fue||{}),u0=(s=>(s.TimedOut="timed_out",s.AgentFailed="agent_failed",s.SetupFailed="setup_failed",s.CredentialMissing="credential_missing",s.RunnerLost="runner_lost",s))(u0||{}),TU=(r=>(r.Onboard="onboard",r.Deploy="deploy",r))(TU||{}),NU=(r=>(r.Started="started",r.Finished="finished",r))(NU||{}),QU=(n=>(n.Passed="passed",n.Failed="failed",n.Skipped="skipped",n))(QU||{}),hl=S.string().regex(/^[1-9][0-9]{0,18}$/),dy=S.string().regex(/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/),Wa=S.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),ah=S.string().regex(/^[0-9a-f]{64}$/),s0=S.object({id:Wa,revision:hl}).strict(),Ls=S.object({provider:S.nativeEnum(o0),providerAccountId:hl,providerRepositoryId:hl}).strict(),xU=t=>`${t.provider}:${t.providerRepositoryId}`,hue=Ls.extend({namespace:S.string().min(1),name:S.string().min(1)}).strict(),L4e=S.object({repository:hue,revision:dy,ref:S.string().nullable(),reason:S.nativeEnum(SU),change:S.object({kind:S.nativeEnum(RU),number:hl,base:S.object({ref:S.string().min(1),revision:dy}).strict().optional()}).strict().nullable()}).strict();function O4e(t){let e=t.baseline.sources,r=t.trigger.kind==="schedule"&&t.baseline.confirmedRunId!==null;if(!e)return r?"names every source of the snapshot, once":null;if(t.baseline.confirmedRunId===null)return"a run with no Confirmed Baseline names no baseline sources";let n=new Set(t.sources.map(o=>xU(o.repository))),i=new Set(e.map(o=>xU(o.repository)));return i.size===e.length&&i.size===n.size&&[...i].every(o=>n.has(o))?null:"names every source of the snapshot, once"}var U4e=S.object({schemaVersion:S.literal(1),runId:Wa,skyrampOrgId:Wa,target:s0,policy:s0.nullable(),trigger:S.object({kind:S.nativeEnum(a0),requestedAt:S.string().datetime()}).strict(),configuration:S.object({captureId:Wa,revision:hl.nullable(),hash:ah}).strict(),baseline:S.object({confirmedRunId:Wa.nullable(),sources:S.array(S.object({repository:Ls,revision:dy}).strict()).optional()}).strict(),sources:S.array(L4e).min(1),execution:S.object({provider:S.nativeEnum(o0),repository:hue,workflowPath:S.string(),ref:S.string()}).strict(),credentials:S.array(S.object({name:S.string(),purpose:S.nativeEnum(c0),required:S.boolean()}).strict())}).strict().superRefine((t,e)=>{let r=t.trigger.kind,n=M4e.includes(r);n!==(t.policy===null)&&e.addIssue({code:S.ZodIssueCode.custom,path:["policy"],message:n?`a ${r} run has no policy`:"names the policy revision"});let i=O4e(t);i&&e.addIssue({code:S.ZodIssueCode.custom,path:["baseline","sources"],message:i}),F4e.includes(r)&&t.sources.forEach((s,o)=>{s.reason!=="BASELINE"&&e.addIssue({code:S.ZodIssueCode.custom,path:["sources",o,"reason"],message:`a ${r} run selects only BASELINE sources`})})});var X0t=S.object({schemaVersion:S.literal(1),attempt:S.object({id:Wa,number:S.number().int().positive(),deadlineAt:S.string().datetime()}).strict(),manifest:U4e,manifestHash:ah,entitlements:S.array(S.string()).optional(),runToken:S.string().min(1).optional()}).strict(),eSt=S.object({schemaVersion:S.literal(1),runId:Wa,execution:S.object({provider:S.nativeEnum(o0),repository:Ls,providerRunId:hl,providerRunAttempt:S.number().int().positive(),workflowRef:S.string().min(1)}).strict()}).strict(),pue=S.object({repository:Ls,number:hl}).strict(),q4e=S.discriminatedUnion("status",[S.object({status:S.literal("none")}).strict(),S.object({status:S.literal("delivered"),pullRequests:S.array(pue).min(1)}).strict(),S.object({status:S.literal("partial"),pullRequests:S.array(pue).min(1),failures:S.array(S.object({repository:Ls,message:S.string()}).strict()).min(1)}).strict(),S.object({status:S.literal("failed"),message:S.string()}).strict()]),G4e=S.object({sufficiency:S.nativeEnum(n0),rationale:S.string().min(1),gaps:S.array(S.string().min(1)),acceptedEvidence:S.array(S.object({kind:S.nativeEnum(EU),repository:S.string().min(1),revision:dy,reference:S.string().min(1),summary:S.string().min(1)}).strict()),actionRequired:S.array(S.nativeEnum(yU))}).strict().superRefine((t,e)=>{t.sufficiency==="sufficient"!=(t.gaps.length===0)&&e.addIssue({code:S.ZodIssueCode.custom,path:["gaps"],message:"sufficient evidence has no gaps, and insufficient evidence names at least one"}),new Set(t.actionRequired).size!==t.actionRequired.length&&e.addIssue({code:S.ZodIssueCode.custom,path:["actionRequired"],message:"a reason appears twice"})}),BU=500,H4e=2048,z4e=1e3,V4e=S.object({testResults:S.array(S.object({resultId:S.string().regex(/^[^\u0000-\u001f]{1,512}$/),repository:S.string().regex(/^[A-Za-z0-9._-]{1,100}\/[A-Za-z0-9._-]{1,100}$/),testType:S.string(),endpoint:S.string(),status:S.enum(["Pass","Fail","Skipped"]),details:S.string(),fileName:S.string().optional(),testId:S.string().regex(/^[^\u0000-\u001f]{1,512}$/).optional(),failureCause:S.object({kind:S.nativeEnum(bU),family:S.nativeEnum(CU).optional()}).strict().optional()}).strict()),validation:G4e,changes:S.array(S.object({id:S.string().min(1).max(512),text:S.string().max(16384),source:S.string().max(H4e),testedBy:S.array(S.string().min(1).max(1024)).max(BU),writtenBy:S.array(S.string().min(1).max(1024)).max(BU),maintainedBy:S.array(S.string().min(1).max(1024)).max(BU)}).strict()).max(z4e).optional(),traceVersion:S.literal(1)}).passthrough().superRefine((t,e)=>{let r=new Set;t.testResults.forEach((n,i)=>{let s=n.failureCause;s&&n.status==="Pass"&&e.addIssue({code:S.ZodIssueCode.custom,path:["testResults",i,"failureCause"],message:"a passing result has no failure cause"}),s&&s.kind==="environment"!=(s.family!==void 0)&&e.addIssue({code:S.ZodIssueCode.custom,path:["testResults",i,"failureCause"],message:"an environment cause names its family, and no other cause does"});let o=["testResults",i,"resultId"],a=n.resultId.slice(`${n.repository}:${n.testType}:`.length);(!n.resultId.startsWith(`${n.repository}:${n.testType}:`)||a===""||a.startsWith("/")||a.startsWith("#"))&&e.addIssue({code:S.ZodIssueCode.custom,path:o,message:"is not repository:testType:path for this result"}),r.has(n.resultId)&&e.addIssue({code:S.ZodIssueCode.custom,path:o,message:"stable identity repeated"}),r.add(n.resultId)})});var Y4e=S.object({schemaVersion:S.literal(1),run:S.object({runId:Wa,attemptNumber:S.number().int().positive(),manifestHash:ah}).strict(),target:s0,policy:s0,provenance:S.object({sources:S.array(S.object({repository:Ls,revision:dy}).strict())}).strict(),delivery:S.object({generatedTests:q4e}).strict(),producer:S.object({testbot:S.string().regex(/^[0-9A-Za-z.+-]{1,64}$/),mcp:S.string().regex(/^[0-9A-Za-z.+-]{1,64}$/)}).strict(),report:V4e}).strict(),tSt=Y4e.pick({schemaVersion:!0,run:!0,target:!0,provenance:!0,producer:!0}).extend({recipe:due}).strict().superRefine(({recipe:t},e)=>{let r=(s,o)=>e.addIssue({code:S.ZodIssueCode.custom,path:["recipe",...s],message:o});t.status==="blocked"&&t.blockers.length===0&&r(["blockers"],"a blocked recipe names at least one blocker");let n=new Set,i=0;t.files.forEach((s,o)=>{i0(s.path)||r(["files",o,"path"],"is not .skyramp/workspace.yml or a file under .skyramp/sut/"),n.has(s.path)&&r(["files",o,"path"],"file repeated"),n.add(s.path),wU.test(s.content)&&r(["files",o,"content"],"is not text");let a=Buffer.byteLength(s.content,"utf8");i+=a,a>ly&&r(["files",o,"content"],`larger than ${ly} bytes`)}),i>uy&&r(["files"],`recipe text over ${uy} bytes in total`)}),$4e=S.object({schemaVersion:S.literal(1),stage:S.nativeEnum(TU),event:S.nativeEnum(NU),status:S.nativeEnum(QU).optional()}).strict().refine(t=>t.status===void 0||t.event==="finished",{path:["status"],message:"only a finished stage has a status"}),W4e=S.object({schemaVersion:S.literal(1),configuration:S.object({captureId:Wa,revision:hl.nullable(),hash:ah}).strict(),capture:S.object({schemaVersion:S.literal(1),settings:S.object({target:S.object({environment:S.unknown()}).passthrough(),timeoutMinutes:S.number().int().positive()}).passthrough(),provenance:S.object({}).passthrough(),hash:ah}).strict()}).strict(),j4e=S.object({schemaVersion:S.literal(1),runtimePlan:S.object({version:S.number().int().positive(),contentHash:ah,files:S.array(S.object({path:S.string().refine(i0,"not a recipe file path"),content:S.string()}).strict()).min(1)}).strict().nullable()}).strict(),J4e=S.object({schemaVersion:S.literal(1),state:S.nativeEnum(fue),ending:S.nativeEnum(l0).nullable(),cause:S.nativeEnum(u0).nullable(),deadlineAt:S.string().datetime()}).strict();function Aue(t){return t.reportUploaded?{schemaVersion:1,reason:"report_uploaded",cause:null}:t.recipeUploaded?{schemaVersion:1,reason:"recipe_uploaded",cause:null}:t.cancelled?{schemaVersion:1,reason:"cancelled",cause:null}:{schemaVersion:1,reason:"no_report",cause:K4e(t)}}function K4e(t){return t.credentialMissing?"credential_missing":t.setupFailed?"setup_failed":t.timedOut?"timed_out":"agent_failed"}var vU=(n=>(n.Unit="unit",n.Integration="integration",n.E2e="e2e",n))(vU||{});at();hU();ay();var mue;(function(t){t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.space=32]="space",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.asterisk=42]="asterisk",t[t.backslash=92]="backslash",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.plus=43]="plus",t[t.slash=47]="slash",t[t.formFeed=12]="formFeed",t[t.tab=9]="tab"})(mue||(mue={}));var X4e=new Array(20).fill(0).map((t,e)=>" ".repeat(e)),ch=200,e5e={" ":{"\n":new Array(ch).fill(0).map((t,e)=>`
216
216
  `+" ".repeat(e)),"\r":new Array(ch).fill(0).map((t,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(ch).fill(0).map((t,e)=>`\r
217
217
  `+" ".repeat(e))}," ":{"\n":new Array(ch).fill(0).map((t,e)=>`
218
218
  `+" ".repeat(e)),"\r":new Array(ch).fill(0).map((t,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(ch).fill(0).map((t,e)=>`\r
219
- `+" ".repeat(e))}};var yue;(function(t){t.DEFAULT={allowTrailingComma:!1}})(yue||(yue={}));var Eue;(function(t){t[t.None=0]="None",t[t.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=2]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",t[t.InvalidUnicode=4]="InvalidUnicode",t[t.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",t[t.InvalidCharacter=6]="InvalidCharacter"})(Eue||(Eue={}));var bue;(function(t){t[t.OpenBraceToken=1]="OpenBraceToken",t[t.CloseBraceToken=2]="CloseBraceToken",t[t.OpenBracketToken=3]="OpenBracketToken",t[t.CloseBracketToken=4]="CloseBracketToken",t[t.CommaToken=5]="CommaToken",t[t.ColonToken=6]="ColonToken",t[t.NullKeyword=7]="NullKeyword",t[t.TrueKeyword=8]="TrueKeyword",t[t.FalseKeyword=9]="FalseKeyword",t[t.StringLiteral=10]="StringLiteral",t[t.NumericLiteral=11]="NumericLiteral",t[t.LineCommentTrivia=12]="LineCommentTrivia",t[t.BlockCommentTrivia=13]="BlockCommentTrivia",t[t.LineBreakTrivia=14]="LineBreakTrivia",t[t.Trivia=15]="Trivia",t[t.Unknown=16]="Unknown",t[t.EOF=17]="EOF"})(bue||(bue={}));var Cue;(function(t){t[t.InvalidSymbol=1]="InvalidSymbol",t[t.InvalidNumberFormat=2]="InvalidNumberFormat",t[t.PropertyNameExpected=3]="PropertyNameExpected",t[t.ValueExpected=4]="ValueExpected",t[t.ColonExpected=5]="ColonExpected",t[t.CommaExpected=6]="CommaExpected",t[t.CloseBraceExpected=7]="CloseBraceExpected",t[t.CloseBracketExpected=8]="CloseBracketExpected",t[t.EndOfFileExpected=9]="EndOfFileExpected",t[t.InvalidCommentToken=10]="InvalidCommentToken",t[t.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=12]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",t[t.InvalidUnicode=14]="InvalidUnicode",t[t.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",t[t.InvalidCharacter=16]="InvalidCharacter"})(Cue||(Cue={}));at();ay();var a5e=900*1e3;at();var c5e=`http.${(process.env.GITHUB_SERVER_URL||"https://github.com").replace(/\/+$/,"")}/.extraheader`,l5e=t=>t.replace(/[.[\]^$*+?(){}|\\]/g,"\\$&"),XSt=`^${l5e(c5e)}$`;var u5e=".skyramp/videos",eRt=`:(exclude)${u5e}/`;var p5e=10*6e4;function wue(t,e){return t.getTime()-e.getTime()-p5e}var CRt=10*6e4,f5e=3e4,h5e=3,A5e=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;var py=class extends Error{constructor(r,n){super(r);this.status=n}status};function m5e(t){let e;try{e=new URL(t)}catch{throw new Error(`skyrampAppOrigin "${t}" is not a URL`)}if(e.protocol!=="https:"||e.origin!==t.replace(/\/+$/,""))throw new Error(`skyrampAppOrigin must be an https origin, got "${t}"`);return e.origin}function g5e(t,e){if(!A5e.test(t))throw new Error(`The ${e} "${t}" is not a uuid`);return t}async function y5e(t,e,r,n){let i=m5e(t.origin),s;for(let o=1;o<=h5e;o+=1){o>1&&await new Promise(a=>setTimeout(a,(t.retryDelayMs??2e3)*(o-1)));try{let a=await t.idToken(i),c=await(t.fetch??fetch)(new URL(r,i).toString(),{method:e,headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json",Accept:"application/json"},body:e==="GET"?void 0:JSON.stringify(n),redirect:"error",signal:AbortSignal.timeout(f5e)}),l=await c.json().catch(()=>({}));if(c.ok)return l.data;let u=`The Skyramp app refused ${e} ${r}: ${c.status} ${l.error?.code??"no error code"}`;if(c.status<500&&c.status!==429)throw new py(u,c.status);s=new Error(u)}catch(a){if(a instanceof py)throw a;s=a}}throw s}var wRt=10*6e4;var IRt=["TRIGGER","AUTHORITATIVE_RELATED_CHANGE"];var BRt=S.object({tests:S.object({placements:S.array(S.unknown()).optional()}).passthrough().optional()}).passthrough(),xRt=S.object({repository:Ls.passthrough(),testType:S.nativeEnum(vU),directory:S.string()}).passthrough();var SRt=S.object({environment:S.object({components:S.array(S.unknown()).optional(),dependencies:S.array(S.unknown()).optional()}).passthrough()}).passthrough(),RRt=S.object({name:S.string().min(1),provision:S.literal("existing"),url:S.string().min(1),repository:Ls.passthrough().optional(),revisionUrl:S.string().min(1).optional()}).passthrough(),TRt=S.object({name:S.string().min(1),url:S.string().nullable(),versionUrl:S.string().nullable(),notes:S.string().nullable()}).passthrough();async function Iue(t,e){return g5e(t.attemptId,"attempt id"),y5e(e,"POST",`/api/v1/runner/attempts/${t.attemptId}/end`,Aue({reportUploaded:t.reportUploaded,recipeUploaded:t.recipeUploaded,cancelled:t.cause==="cancelled",timedOut:t.cause==="timed_out",setupFailed:t.cause==="setup_failed",credentialMissing:t.cause==="credential_missing"}))}var QRt=new RegExp("(^|/)("+["test_[^/]+\\.py","[^/]+_test\\.py","[^/]+\\.(spec|test)\\.[cm]?[jt]sx?","[^/]+_test\\.go","[^/]+Tests?\\.(java|kts?)","[^/]+_(test|spec)\\.rb","[^/]+\\.feature","[^/]+Tests?\\.cs","[^/]+_test\\.rs","tests/[^/]+\\.rs","[^/]+Test\\.php","[^/]+(Test|Spec|Suite)\\.scala","[^/]+Tests?\\.swift","[^/]+_test\\.exs","[^/]+_test\\.dart","[^/]+_test\\.(c|cc|cpp|cxx)","test_[^/]+\\.(c|cc|cpp|cxx)","[^/]+(Spec|Test)\\.groovy"].join("|")+")$","i");var ORt={focused:"Focused",impacted_critical:"Impacted and critical",broad:"Broad"};var d0=Ae(require("path")),HRt=d0.join(".skyramp","sut"),zRt=d0.join(".skyramp","workspace.yml");var Bue=".skyramp/sut/health.json",fTt={[Bue]:`${Bue} (with a url or command)`,".skyramp/workspace.yml":".skyramp/workspace.yml (create it with skyramp_init_scan and skyramp_init_workspace)"};var I5e=50,B5e=50,x5e=4096,S5e=8e3,R5e=2048,T5e=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f]/,N5e=/^(?!\/)(?!.*(?:^|\/)\.\.?(?:\/|$))[A-Za-z0-9._/ -]{1,255}$/,Q5e=/^\.github\/workflows\/[A-Za-z0-9._-]+\.ya?ml$/,v5e=/^(?!GITHUB_)(?!SKYRAMP_RUNNER_)[A-Z][A-Z0-9_]{0,99}$/,Sue=(s=>(s.Command="command",s.ComposeFile="compose_file",s.DeploymentWorkflow="deployment_workflow",s.Url="url",s.Guidance="guidance",s))(Sue||{}),k5e={command:"optional",compose_file:"required",deployment_workflow:"required",url:"none",guidance:"none"},xue=t=>S.string().max(t).refine(e=>e.trim().length>0&&!T5e.test(e),"must be non-blank text with no control characters other than tab, LF and CR");function _5e(t){let e;try{e=new URL(t)}catch{return"invalid URL"}if(e.protocol!=="https:"&&e.protocol!=="http:")return"only http and https URLs";if(e.username||e.password)return"a URL cannot carry a login"}var P5e={command:xue(x5e),compose_file:S.string().regex(N5e,"must be a relative path inside the repository"),deployment_workflow:S.string().regex(Q5e,"must be a .github/workflows/*.yml path"),url:S.string().max(R5e).superRefine((t,e)=>{let r=_5e(t);r&&e.addIssue({code:S.ZodIssueCode.custom,message:r})}),guidance:xue(S5e)},D5e=S.object({kind:S.nativeEnum(Sue),value:S.string(),repository:Ls.nullable()}).strict().superRefine((t,e)=>{let r=k5e[t.kind];r==="required"&&!t.repository&&e.addIssue({code:S.ZodIssueCode.custom,path:["repository"],message:"a file belongs to a repository"}),r==="none"&&t.repository&&e.addIssue({code:S.ZodIssueCode.custom,path:["repository"],message:`a ${t.kind} names no repository`});let n=P5e[t.kind].safeParse(t.value);if(!n.success)for(let i of n.error.issues)e.addIssue({code:S.ZodIssueCode.custom,path:["value"],message:i.message})}),M5e=S.object({name:S.string().regex(v5e,"must be a GitHub Actions secret name (A-Z, 0-9, _; not GITHUB_ or SKYRAMP_RUNNER_)"),purpose:S.nativeEnum(c0),required:S.boolean()}).strict(),bTt=S.object({knowledge:S.array(D5e).max(I5e),credentials:S.array(M5e).max(B5e)}).strict().superRefine((t,e)=>{let r=new Set;t.credentials.forEach((n,i)=>{r.has(n.name)&&e.addIssue({code:S.ZodIssueCode.custom,path:["credentials",i,"name"],message:"named twice"}),r.add(n.name)})});var CTt={model_provider:"model provider",sut_access:"SUT access",skyramp:"Skyramp",other:"other"};var F5e="https://testbot.skyramp.dev",lh={attemptId:"v3AttemptId",origin:"v3Origin",deadlineAt:"v3DeadlineAt",reportUploaded:"v3ReportUploaded",recipeUploaded:"v3RecipeUploaded",cause:"v3Cause"};var L5e=3e4;function O5e(t){let e=t.ACTIONS_ID_TOKEN_REQUEST_URL,r=t.ACTIONS_ID_TOKEN_REQUEST_TOKEN;return delete t.ACTIONS_ID_TOKEN_REQUEST_URL,delete t.ACTIONS_ID_TOKEN_REQUEST_TOKEN,async n=>{if(!e||!r)throw new Error("The job cannot request an OIDC token. Give it the `id-token: write` permission.");let i=new URL(e);i.searchParams.set("audience",n);let s=await fetch(i,{headers:{Authorization:`Bearer ${r}`,Accept:"application/json"},redirect:"error",signal:AbortSignal.timeout(L5e)});if(!s.ok)throw new Error(`GitHub refused the OIDC token request: ${s.status}`);let o=(await s.json().catch(()=>({}))).value;if(typeof o!="string"||!o)throw new Error("GitHub's OIDC token response carried no token");return Oi(o),o}}function U5e(t,e){return{origin:t,idToken:e,mask:r=>Oi(r),log:r=>we(r)}}var sNt={cancelled:"Skyramp cancelled this run",expired:"this attempt passed its deadline in Skyramp",ended:"Skyramp already ended this attempt"},oNt={cancelled:"cancelled",expired:"timed_out",ended:"agent_failed"};var aNt={analyze:"analyze",triage:"analyze",recommend:"recommend",generate:"generate","generate-ui":"generate","generate-unit":"generate",adapt:"generate",onboard:"execute",deploy:"execute","native-run":"execute",deliver:"deliver"},cNt={analyze:"change analysis",recommend:"test recommendations",generate:"test generation",execute:"test execution",deliver:"opening a pull request with the tests"};var lNt={onboard:"onboard",deploy:"deploy"};async function Rue(){let t=di(lh.attemptId);if(!t)return;let e=di(lh.reportUploaded)==="true",r=di(lh.recipeUploaded)==="true",n=di(lh.deadlineAt),i=di(lh.cause)||void 0;!i&&!e&&!r&&n&&wue(new Date(n),new Date)<=0&&(i="timed_out");let s=O5e(process.env),o=await Iue({attemptId:t,reportUploaded:e,recipeUploaded:r,cause:i},U5e(di(lh.origin)||F5e,s));we(`Testbot V3: attempt ended; the run's outcome in Skyramp is ${o.outcome??"not final yet"}.`)}at();var f0=Ae(require("crypto"));function kU(t){return Buffer.from(t).toString("base64url")}function q5e(t){return t.replace(/\\r\\n/g,`
219
+ `+" ".repeat(e))}};var yue;(function(t){t.DEFAULT={allowTrailingComma:!1}})(yue||(yue={}));var Eue;(function(t){t[t.None=0]="None",t[t.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=2]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",t[t.InvalidUnicode=4]="InvalidUnicode",t[t.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",t[t.InvalidCharacter=6]="InvalidCharacter"})(Eue||(Eue={}));var bue;(function(t){t[t.OpenBraceToken=1]="OpenBraceToken",t[t.CloseBraceToken=2]="CloseBraceToken",t[t.OpenBracketToken=3]="OpenBracketToken",t[t.CloseBracketToken=4]="CloseBracketToken",t[t.CommaToken=5]="CommaToken",t[t.ColonToken=6]="ColonToken",t[t.NullKeyword=7]="NullKeyword",t[t.TrueKeyword=8]="TrueKeyword",t[t.FalseKeyword=9]="FalseKeyword",t[t.StringLiteral=10]="StringLiteral",t[t.NumericLiteral=11]="NumericLiteral",t[t.LineCommentTrivia=12]="LineCommentTrivia",t[t.BlockCommentTrivia=13]="BlockCommentTrivia",t[t.LineBreakTrivia=14]="LineBreakTrivia",t[t.Trivia=15]="Trivia",t[t.Unknown=16]="Unknown",t[t.EOF=17]="EOF"})(bue||(bue={}));var Cue;(function(t){t[t.InvalidSymbol=1]="InvalidSymbol",t[t.InvalidNumberFormat=2]="InvalidNumberFormat",t[t.PropertyNameExpected=3]="PropertyNameExpected",t[t.ValueExpected=4]="ValueExpected",t[t.ColonExpected=5]="ColonExpected",t[t.CommaExpected=6]="CommaExpected",t[t.CloseBraceExpected=7]="CloseBraceExpected",t[t.CloseBracketExpected=8]="CloseBracketExpected",t[t.EndOfFileExpected=9]="EndOfFileExpected",t[t.InvalidCommentToken=10]="InvalidCommentToken",t[t.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=12]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",t[t.InvalidUnicode=14]="InvalidUnicode",t[t.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",t[t.InvalidCharacter=16]="InvalidCharacter"})(Cue||(Cue={}));at();ay();var a5e=900*1e3;at();var c5e=`http.${(process.env.GITHUB_SERVER_URL||"https://github.com").replace(/\/+$/,"")}/.extraheader`,l5e=t=>t.replace(/[.[\]^$*+?(){}|\\]/g,"\\$&"),XSt=`^${l5e(c5e)}$`;var u5e=".skyramp/videos",eRt=`:(exclude)${u5e}/`;var p5e=10*6e4;function wue(t,e){return t.getTime()-e.getTime()-p5e}var CRt=10*6e4,f5e=3e4,h5e=3,A5e=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;var py=class extends Error{constructor(r,n){super(r);this.status=n}status};function m5e(t){let e;try{e=new URL(t)}catch{throw new Error(`skyrampAppOrigin "${t}" is not a URL`)}if(e.protocol!=="https:"||e.origin!==t.replace(/\/+$/,""))throw new Error(`skyrampAppOrigin must be an https origin, got "${t}"`);return e.origin}function g5e(t,e){if(!A5e.test(t))throw new Error(`The ${e} "${t}" is not a uuid`);return t}async function y5e(t,e,r,n){let i=m5e(t.origin),s;for(let o=1;o<=h5e;o+=1){o>1&&await new Promise(a=>setTimeout(a,(t.retryDelayMs??2e3)*(o-1)));try{let a=await t.idToken(i),c=await(t.fetch??fetch)(new URL(r,i).toString(),{method:e,headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json",Accept:"application/json"},body:e==="GET"?void 0:JSON.stringify(n),redirect:"error",signal:AbortSignal.timeout(f5e)}),l=await c.json().catch(()=>({}));if(c.ok)return l.data;let u=`The Skyramp app refused ${e} ${r}: ${c.status} ${l.error?.code??"no error code"}`;if(c.status<500&&c.status!==429)throw new py(u,c.status);s=new Error(u)}catch(a){if(a instanceof py)throw a;s=a}}throw s}var wRt=10*6e4;var IRt=["TRIGGER","AUTHORITATIVE_RELATED_CHANGE"];var BRt=S.object({tests:S.object({placements:S.array(S.unknown()).optional()}).passthrough().optional()}).passthrough(),xRt=S.object({repository:Ls.passthrough(),testType:S.nativeEnum(vU),directory:S.string()}).passthrough();var SRt=S.object({environment:S.object({components:S.array(S.unknown()).optional(),dependencies:S.array(S.unknown()).optional()}).passthrough()}).passthrough(),RRt=S.object({name:S.string().min(1),provision:S.literal("existing"),url:S.string().min(1),repository:Ls.passthrough().optional(),revisionUrl:S.string().min(1).optional()}).passthrough(),TRt=S.object({name:S.string().min(1),url:S.string().nullable(),versionUrl:S.string().nullable(),notes:S.string().nullable()}).passthrough();async function Iue(t,e){return g5e(t.attemptId,"attempt id"),y5e(e,"POST",`/api/v1/runner/attempts/${t.attemptId}/end`,Aue({reportUploaded:t.reportUploaded,recipeUploaded:t.recipeUploaded,cancelled:t.cause==="cancelled",timedOut:t.cause==="timed_out",setupFailed:t.cause==="setup_failed",credentialMissing:t.cause==="credential_missing"}))}var QRt=new RegExp("(^|/)("+["test_[^/]+\\.py","[^/]+_test\\.py","[^/]+\\.(spec|test)\\.[cm]?[jt]sx?","[^/]+_test\\.go","[^/]+Tests?\\.(java|kts?)","[^/]+_(test|spec)\\.rb","[^/]+\\.feature","[^/]+Tests?\\.cs","[^/]+_test\\.rs","tests/[^/]+\\.rs","[^/]+Test\\.php","[^/]+(Test|Spec|Suite)\\.scala","[^/]+Tests?\\.swift","[^/]+_test\\.exs","[^/]+_test\\.dart","[^/]+_test\\.(c|cc|cpp|cxx)","test_[^/]+\\.(c|cc|cpp|cxx)","[^/]+(Spec|Test)\\.groovy"].join("|")+")$","i");var ORt={focused:"Focused",impacted_critical:"Impacted and critical",broad:"Broad"};var d0=Ae(require("path")),HRt=d0.join(".skyramp","sut"),zRt=d0.join(".skyramp","workspace.yml");var Bue=".skyramp/sut/health.json",fTt={[Bue]:`${Bue} (with a url or command)`,".skyramp/workspace.yml":".skyramp/workspace.yml (create it with skyramp_init_scan and skyramp_init_workspace)"};var I5e=50,B5e=50,x5e=4096,S5e=8e3,R5e=2048,T5e=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f]/,N5e=/^(?!\/)(?!.*(?:^|\/)\.\.?(?:\/|$))[A-Za-z0-9._/ -]{1,255}$/,Q5e=/^\.github\/workflows\/[A-Za-z0-9._-]+\.ya?ml$/,v5e=/^(?!GITHUB_)(?!SKYRAMP_RUNNER_)[A-Z][A-Z0-9_]{0,99}$/,Sue=(s=>(s.Command="command",s.ComposeFile="compose_file",s.DeploymentWorkflow="deployment_workflow",s.Url="url",s.Guidance="guidance",s))(Sue||{}),k5e={command:"optional",compose_file:"required",deployment_workflow:"required",url:"none",guidance:"none"},xue=t=>S.string().max(t).refine(e=>e.trim().length>0&&!T5e.test(e),"must be non-blank text with no control characters other than tab, LF and CR");function _5e(t){let e;try{e=new URL(t)}catch{return"invalid URL"}if(e.protocol!=="https:"&&e.protocol!=="http:")return"only http and https URLs";if(e.username||e.password)return"a URL cannot carry a login"}var P5e={command:xue(x5e),compose_file:S.string().regex(N5e,"must be a relative path inside the repository"),deployment_workflow:S.string().regex(Q5e,"must be a .github/workflows/*.yml path"),url:S.string().max(R5e).superRefine((t,e)=>{let r=_5e(t);r&&e.addIssue({code:S.ZodIssueCode.custom,message:r})}),guidance:xue(S5e)},D5e=S.object({kind:S.nativeEnum(Sue),value:S.string(),repository:Ls.nullable()}).strict().superRefine((t,e)=>{let r=k5e[t.kind];r==="required"&&!t.repository&&e.addIssue({code:S.ZodIssueCode.custom,path:["repository"],message:"a file belongs to a repository"}),r==="none"&&t.repository&&e.addIssue({code:S.ZodIssueCode.custom,path:["repository"],message:`a ${t.kind} names no repository`});let n=P5e[t.kind].safeParse(t.value);if(!n.success)for(let i of n.error.issues)e.addIssue({code:S.ZodIssueCode.custom,path:["value"],message:i.message})}),M5e=S.object({name:S.string().regex(v5e,"must be a GitHub Actions secret name (A-Z, 0-9, _; not GITHUB_ or SKYRAMP_RUNNER_)"),purpose:S.nativeEnum(c0),required:S.boolean()}).strict(),bTt=S.object({knowledge:S.array(D5e).max(I5e),credentials:S.array(M5e).max(B5e)}).strict().superRefine((t,e)=>{let r=new Set;t.credentials.forEach((n,i)=>{r.has(n.name)&&e.addIssue({code:S.ZodIssueCode.custom,path:["credentials",i,"name"],message:"named twice"}),r.add(n.name)})});var CTt={model_provider:"model provider",sut_access:"SUT access",skyramp:"Skyramp",other:"other"};var F5e="https://testbot.skyramp.dev",lh={attemptId:"v3AttemptId",origin:"v3Origin",deadlineAt:"v3DeadlineAt",reportUploaded:"v3ReportUploaded",recipeUploaded:"v3RecipeUploaded",cause:"v3Cause"};var L5e=3e4;function O5e(t){let e=t.ACTIONS_ID_TOKEN_REQUEST_URL,r=t.ACTIONS_ID_TOKEN_REQUEST_TOKEN;return delete t.ACTIONS_ID_TOKEN_REQUEST_URL,delete t.ACTIONS_ID_TOKEN_REQUEST_TOKEN,async n=>{if(!e||!r)throw new Error("The job cannot request an OIDC token. Give it the `id-token: write` permission.");let i=new URL(e);i.searchParams.set("audience",n);let s=await fetch(i,{headers:{Authorization:`Bearer ${r}`,Accept:"application/json"},redirect:"error",signal:AbortSignal.timeout(L5e)});if(!s.ok)throw new Error(`GitHub refused the OIDC token request: ${s.status}`);let o=(await s.json().catch(()=>({}))).value;if(typeof o!="string"||!o)throw new Error("GitHub's OIDC token response carried no token");return Oi(o),o}}function U5e(t,e){return{origin:t,idToken:e,mask:r=>Oi(r),log:r=>we(r)}}var oNt={cancelled:"Skyramp cancelled this run",expired:"this attempt passed its deadline in Skyramp",ended:"Skyramp already ended this attempt"},aNt={cancelled:"cancelled",expired:"timed_out",ended:"agent_failed"};var cNt={analyze:"analyze",triage:"analyze",recommend:"recommend",generate:"generate","generate-ui":"generate","generate-unit":"generate",adapt:"generate",onboard:"execute",deploy:"execute","native-run":"execute",deliver:"deliver"},lNt={analyze:"change analysis",recommend:"test recommendations",generate:"test generation",execute:"test execution",deliver:"opening a pull request with the tests"};var uNt={onboard:"onboard",deploy:"deploy"};async function Rue(){let t=di(lh.attemptId);if(!t)return;let e=di(lh.reportUploaded)==="true",r=di(lh.recipeUploaded)==="true",n=di(lh.deadlineAt),i=di(lh.cause)||void 0;!i&&!e&&!r&&n&&wue(new Date(n),new Date)<=0&&(i="timed_out");let s=O5e(process.env),o=await Iue({attemptId:t,reportUploaded:e,recipeUploaded:r,cause:i},U5e(di(lh.origin)||F5e,s));we(`Testbot V3: attempt ended; the run's outcome in Skyramp is ${o.outcome??"not final yet"}.`)}at();var f0=Ae(require("crypto"));function kU(t){return Buffer.from(t).toString("base64url")}function q5e(t){return t.replace(/\\r\\n/g,`
220
220
  `).replace(/\\n/g,`
221
221
  `).trim()}function G5e(t){return t.includes("-----BEGIN RSA PRIVATE KEY-----")}function H5e(t){return t.includes("-----BEGIN OPENSSH PRIVATE KEY-----")}function z5e(t){let e=t.split(`
222
222
  `).map(r=>r.trim()).filter(r=>r&&!r.startsWith("-----")).join("");return Buffer.from(e,"base64")}function V5e(t){let e=q5e(t);if(H5e(e))throw new Error(`githubAppPrivateKey is in OpenSSH format, but GitHub Apps issue PKCS#1 ("-----BEGIN RSA PRIVATE KEY-----") or PKCS#8 ("-----BEGIN PRIVATE KEY-----") keys. Re-download the .pem from the GitHub App's settings page.`);let r=G5e(e)?"pkcs1":"pkcs8";try{return f0.createPrivateKey({key:z5e(e),format:"der",type:r})}catch(n){let i=r==="pkcs1"?"PKCS#1":"PKCS#8";throw new Error(`Failed to parse githubAppPrivateKey as a ${i} private key: ${n instanceof Error?n.message:String(n)}. Ensure the secret contains the full PEM, unmodified from the GitHub App's downloaded .pem file.`)}}function Y5e(t,e,r=Date.now()){let n=Math.floor(r/1e3),i=kU(JSON.stringify({alg:"RS256",typ:"JWT"})),s=kU(JSON.stringify({iat:n-60,exp:n+540,iss:t})),o=`${i}.${s}`,a=V5e(e),c=f0.createSign("RSA-SHA256").update(o).sign(a);return`${o}.${kU(c)}`}var $5e=50,p0=class{opts;now;fetchImpl;repositories;installationId;cached;inFlight;scopeGeneration=0;constructor(e){this.opts=e,this.now=e.now??Date.now,this.fetchImpl=e.fetchImpl??fetch,this.repositories=e.repositories}setRepositories(e){this.repositories=e,this.scopeGeneration++,this.cached=void 0,this.inFlight=void 0}async getToken(){if(this.cached&&this.now()-this.cached.mintedAtMs<this.refreshThresholdMs())return this.cached.token;if(!this.inFlight){let e=this.mint().finally(()=>{this.inFlight===e&&(this.inFlight=void 0)});this.inFlight=e}return this.inFlight}refreshThresholdMs(){let e=process.env.SKYRAMP_TOKEN_REFRESH_THRESHOLD_MINUTES;return e!==void 0&&e!==""&&!isNaN(Number(e))?Number(e)*6e4:this.opts.refreshThresholdMs??$5e*6e4}async mint(){let e=this.scopeGeneration,r=this.now(),n=Y5e(this.opts.appId,this.opts.privateKey,r),i=await this.discoverInstallationId(n),s=await this.request("POST",`/app/installations/${i}/access_tokens`,n,{repositories:this.repositories});return Oi(s.token),e===this.scopeGeneration&&(this.cached={token:s.token,mintedAtMs:r}),s.token}async discoverInstallationId(e){if(this.installationId===void 0){let r=await this.request("GET",`/repos/${this.opts.owner}/${this.opts.repo}/installation`,e);this.installationId=r.id}return this.installationId}async request(e,r,n,i){let s=process.env.GITHUB_API_URL??"https://api.github.com",o=await this.fetchImpl(`${s}${r}`,{method:e,headers:{authorization:`Bearer ${n}`,accept:"application/vnd.github+json","user-agent":"skyramp-testbot",...i!==void 0&&{"content-type":"application/json"}},body:i===void 0?void 0:JSON.stringify(i)});if(!o.ok){let a=await o.text().catch(()=>"");throw new Error(`GitHub App installation token request failed: ${e} ${r} returned ${o.status}. Check githubAppId/githubAppPrivateKey and that the App is installed on `+`${this.opts.owner}/${this.opts.repo}. ${a}`.trim())}return o.json()}};ay();async function Tue(){Zae(zx(Qe("language")));try{await Rue()}catch(n){ve(`Testbot V3: could not end the attempt: ${n instanceof Error?n.message:String(n)}`)}try{let n=AU(),i=(uh.existsSync(n)?uh.readdirSync(n):[]).filter(m=>/^agent-log\.attempt-\d+\.ndjson$/.test(m)).sort((m,E)=>m.localeCompare(E,void 0,{numeric:!0})).map(m=>ja.join(n,m)),s=ja.join(n,mU),o=[...i,...uh.existsSync(s)?[s]:[]],a=ja.join(n,"testbot-result.txt"),c=ja.join(n,"combined-result.txt"),l=ja.join(n,"agent-stdout.txt"),u=ja.join(n,cue),d=new jf;o.length>0&&await d.uploadArtifact("skyramp-agent-logs",o,n);let f=[a,c,l,u].filter(m=>uh.existsSync(m));f.length>0&&await d.uploadArtifact("skyramp-testbot-report",f,n)}catch(n){ve(`Failed to upload artifacts in post step: ${n instanceof Error?n.message:String(n)}`)}try{let n=sce(),i=await jle(n),s=ja.resolve(n.workingDirectory);await eue(i,s)}catch(n){ve(`Service teardown error: ${n instanceof Error?n.message:String(n)}`)}let t=di("progressCommentId"),e=di("completed"),r=di("cancelled")==="true";if(t&&!e&&r)try{let n=Qe("githubToken"),i=Qe("githubAppId"),s=Qe("githubAppPrivateKey");delete process.env.INPUT_GITHUBAPPPRIVATEKEY;let o=n;if(i&&s){let m=fU(process.env.GITHUB_REPOSITORY??"");if(m){let E=new p0({appId:i,privateKey:s,owner:m.owner,repo:m.repo,repositories:[m.repo]});o=()=>E.getToken()}}if(!o)return;let a=gU(o);tue(a);let c=parseInt(t,10),l=di("steps"),u=l?JSON.parse(l):[],d=a.getRunUrl(),f=rue(u,d);await a.updateComment({id:c},f),Cs("Progress comment updated with cancellation notice")}catch(n){ve(`Failed to update progress comment on cancellation: ${n}`)}}process.env.NODE_ENV!=="test"&&Tue().catch(t=>{cN(t instanceof Error?t.message:String(t))});0&&(module.exports={post});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyramp/testbot-core",
3
- "version": "0.12.0-v3.27",
3
+ "version": "0.12.0-v3.28",
4
4
  "description": "Skyramp Testbot engine: AI-powered deterministic test generation, execution and maintenance",
5
5
  "main": "dist/main.js",
6
6
  "//files": "An explicit allowlist, never a glob. `dist/` is gitignored, so without this key npm's .gitignore fallback would publish a package with no engine in it; with a glob it would publish the sourcemaps, whose sourcesContent embeds every src/*.ts verbatim. eval-entry.js is a development entry and must not ship.",