@skyramp/testbot-core 0.13.0-v3.112 → 0.13.0-v3.113
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.
- package/dist/VERSION.json +1 -1
- package/dist/main.js +1 -1
- package/dist/post.js +1 -1
- package/package.json +1 -1
package/dist/VERSION.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.13.0-v3.
|
|
1
|
+
{"version":"0.13.0-v3.113","commit":"60d765b550fd7b22a8050b2e80d4a2274e3d1a66"}
|
package/dist/main.js
CHANGED
|
@@ -800,7 +800,7 @@ ${HEr(t,e)}`}function HEr(t,e){if(t.inputs.appRunning)return[`${t.inputs.appRunn
|
|
|
800
800
|
`)}function dxr(t){try{return Umt(kt(t.inputs).flatMap(e=>{let r=e.path===t.inputs.repositoryPath?"":qt(t.inputs,e.slug);return Fmt(e.path).map(n=>({label:r,module:n}))}))}catch{return[]}}function pxr(t){let e=Lc(t.inputs)?["It is a shared environment this policy protects: write and run no test that changes state there (a create, edit or delete, a form that submits, a setup that seeds); list any such test in notWritten instead."]:[];if(t.inputs.appRunning){let o=rj(ce(t,`${da}.json`));return[t.inputs.appRunning.trim(),...e,...o?[o]:[]]}let r=ce(t,"deploy.json"),n=Vc(t.inputs.repositoryPath),s=n.setupScript?`start it with ${bs.relative(t.inputs.repositoryPath,n.setupScript)} and check it answers`:"start it the way the repo documents";if(ahe(r)){let o=Object.entries(r.baseUrls??{}).map(([c,l])=>`${c} ${l}`).join(", "),a=r.health?.url??r.health?.command;return[`The app is running${o?`: ${o}`:""}.${a?` Health check: ${a}`:""}`,`If it stops answering, ${s}.`]}return[`The app may not be running.${r?.bringupError?.output?` Planning could not start it: ${r.bringupError.output.slice(0,300)}`:""} Check, and if it isn't up, ${s}; leave it running.`,"If you can't get it running, still write the tests and record them as not run (exit null)."]}function mxr(t){let e=BAe(t);return["No app is running, and none is started for this run: Validation Triage decided the change is proven in-process","(targeted_unit). Every test runs in one process, the way the repo's own in-process tests run: no network or running","app, so nothing that calls a live service, the Skyramp client and its runtime mocks included. Mock outbound calls","(HTTP, queues, other services) inside the test with the repo's own fixtures and mocking tools. Run the tests the way","the repo's CI runs them (its runner, config and environment), selected as step 4 says. Each new test file is named the way its runner","collects tests, as the repo's own tests are. Maintain every stale existing test that can run in-process. An existing","test that needs the running app goes under notWritten, by its path, with what it needs that this run does not have:","it is reported as not covered.",...e.length?["The Target puts new unit tests in these directories, over the repo's own layout: put each new test under its repository's directory, not beside the existing tests:",...e.map(r=>` - ${qt(t.inputs,r.slug)}${r.dir}/`)]:[]]}function fxr(t){return[...t.behaviors.length?['Behaviors that need a new in-process test (give each id in "covers"):',...t.behaviors.map(e=>` - ${e.id}: ${e.statement}
|
|
801
801
|
missing evidence to obtain: ${e.covers||"(unstated)"}
|
|
802
802
|
where the change is: ${e.where}`),"Every behavior above gets an in-process test, except that a test of what the change could break stays only if it","fails on the change (step 1).",""]:[],...t.defects.length?["For each defect suspected above, write a test that reaches it and expects the correct behaviour, so it fails on this","change and passes once the defect is fixed, and give its id in covers; a defect no in-process test can reach goes","under notWritten, with why.",""]:[],...t.browserJourneys.length?["These user journeys need a browser and the running app, which this run does not have: no in-process test can walk","them, so each goes under notWritten by its id, with what it needs that is missing:",...t.browserJourneys.map(e=>` - ${e.id} ${e.name}`),""]:[]]}function hxr(t,e=[]){let r="";try{let n=Zl(t,e),s=[...new Set(n.flatMap(i=>i.secretEnv))].filter(i=>e.includes(i));r=Jut(_h(n),s).trim()}catch{return[]}return r?["Some variables the repo's CI sets would clash with your own model access, so their values are in your shell",`renamed, under a TESTBOT_CI_ prefix. Run a test that needs CI's values with them mapped back: \`${r} <test command>\`.`]:[]}function gxr(t){let e=t.prepared,r=t.inputs.repositoryPath,n=Hn(t),s=n?.repository.currentBranch??"HEAD",i=n?.repository.baseBranch??t.inputs.baseBranch??"origin/main",o=Jr(t),a=ce(t,"analyze.json"),c=new Map((a?.behaviors??[]).map(v=>[v.id,v.statement])),l=(a?.findings??[]).filter(v=>v.status!=="refuted"),u=ce(t,"plan.json"),d=new Map((u?.cases??[]).map(v=>[v.id,v.steps])),p=ha(t.inputs.requirementItems),m=new Map((u?.requirements??[]).flatMap(v=>v.reference&&v.criterion?[[v.id,` (${nm(v.reference,v.criterion,p)})`]]:[])),h=sW(t)&&bh(t),A=ma(t),E=KR(t),y=Zmt(t),w=new Set(y.map(v=>v.id)),C=o.generate.filter(v=>!w.has(v.id)).map(v=>{let k=[v.from_behavior&&`${v.from_behavior}: ${c.get(v.from_behavior)??""}`.trim(),v.from_finding&&`defect ${v.from_finding}`].filter(Boolean).join("; ");return[` - ${v.id} [${v.type}] ${v.target}${k?` \u2014 ${k}`:""}`,` do: ${d.get(v.id)??v.rationale}`,` expect: ${v.expected_observable}`].join(`
|
|
803
|
-
`)});return["Write functional tests for this PR and run them. The plan below came from reading the PR; turn it into tests in the","repo, run them, and tell me what they show about the change.","",`The repo is at ${r}, checked out on branch \`${s}\`. You can see the change with \`git diff ${i}...HEAD\`.`,...EAe(t),...zl(t.inputs),"",...dmt(t.inputs),...mmt(t.inputs),...a?.requirements?.length?["Requirements:",...a.requirements.map(v=>` - ${v.id}${m.get(v.id)??""}: ${v.statement}`),""]:[],...l.length?["Defects suspected while reading the change:",...l.map(v=>` - ${v.id} (${v.severity}) ${v.file}${v.line?`:${v.line}`:""} \u2014 ${v.claim}`),""]:[],"Test plan. Each case's expected outcome is the one the plan sets, not whatever the app does:",...C.length?C:[" (no new cases)"],...o.maintenance.length?["","Existing tests to maintain:",...o.maintenance.map(v=>` - ${v.action.toUpperCase()} ${v.test} \u2014 ${v.evidence}`)]:[],"",...A?fxr(E):[],...cxr(y,{noApp:A}),...A?mxr(t):pxr(t),...h?["For the ui cases you have the Skyramp browser tools (mcp__skyramp__browser_*): look at the real page before you pick locators."]:[],...e.provisionNotes.length?[`Setup notes: ${e.provisionNotes.join("; ")}`]:[],...e.testPackages?.length?["",...nct(e.testPackages,{skyrampVersion:bh(t)&&!A?yR(t.inputs.skyrampMcp):void 0,nodeTests:(A||o.generate.some(v=>v.type!=="ui"))&&Mge(r)})]:[],...e.sharedHelpers?.length?["",...e.sharedHelpers]:[],...hxr(r,t.providedEnvKeys??[]),"","1. Write each test the way the repo already tests that code (the same kind of test, framework, directories, naming,",...A?[" helpers and fixtures), unless that kind cannot check its case in one process; then use the in-process kind that can,"," and where none can, list the case under notWritten with what it needs."]:[" helpers and fixtures), unless that kind of test cannot check its case; then use the kind that can."]," Reuse the repo's helpers, page objects and fixtures: never copy a helper the repo already has \u2014 import it, and if it"," is local to another test file, move it into the repo's shared support module and import it in both. A helper only"," one test file uses stays in that file; a helper two or more of your test files use is defined once, in the repo's"," shared support location (else beside the tests that use it, the way the repo lays out its tests), in a module named for what it holds \u2014 not",` "utils" or "Skyramp". Use every name you import. Where the repo's browser tests reach its pages through page objects,`," so do yours: locate a page's elements in its page object, the way its existing members locate theirs, and add a page"," object, where the repo keeps them, for a page that has none.",...A?[" Write in-process tests the way the repo's own unit and in-process tests are written. The repo's existing tests"]:[" Don't add unit tests (a function or module called directly, its collaborators mocked). The repo's existing tests"]," are for maintenance only: update the ones the change makes wrong \u2014 the maintenance list is where to start, step 4"," finds the rest \u2014 above all any that assert as correct what the plan says is a defect, rather than writing a new"," one beside it."," Keep each requirement's check on its own, so one failure can't hide another: give it its own test or assertion,"," and stub or seed any data its setup needs that a different defect could break (a list the page loads, a shared"," helper that rejects the response before your assertion reads it). A test that shows a defect asserts only the"," outcome its case expects \u2014 one defect per test \u2014 so it passes once that defect is fixed."," For each element or field the change adds, assert that it is there (shown, or present in the response); clicking"," or filling it is not an assertion. For each it removes or renames, assert that it is gone: not shown, a count of 0,"," the field missing, a 404, the old option no longer offered."," Where a case's steps give the exact requests, send them as they are rather than working them out again, and keep"," those tests together in one file."," The plan is where to start, not the limit: if you notice something else the change should do, or could break,"," while you write and run these, test that too; a test of what it could break stays only if it fails on the change,"," so remove one that passes and list its case under notWritten as passing \u2014 never a journey's test, which stays whether it"," passes or fails. Where nothing says what should happen, only decide it for what"," the change does; how older code treats odd input is not this PR's to test. One case for each kind of input is"," enough: add another only where it could fail while the first passes.","2. Run the tests you wrote together, once, in the foreground, with a short per-test timeout so a hung test fails"," fast; wait for the run to finish, and don't end the session with a test run still going.","3. For each failure, work out whose fault it is. If the test checks what its case expects and the app does something"," else, that's a defect in the change: keep the test as written, mark it as a defect, and report the bug. Never change"," an expected outcome to match what the app does. If the test itself is wrong (selector, setup, data, import, timing),"," fix it and re-run only the tests that failed (e.g. pytest --lf, playwright test --last-failed, or by name). Don't"," re-run the whole set at the end: the results you already have stand.","4. Then run the repo's existing tests that reach the code the change touches, the way its CI runs them (its command"," and environment), selected as narrowly as still covers that code: the whole suite only when it runs in a few"," minutes. For each one that fails, find out whether this change made it fail; when you can't tell, run it on the"," base branch in a scratch copy outside the"," checkout (e.g. git worktree add under /tmp). One that asserts behaviour the change deliberately replaced is stale:"," update it, or delete it where the behaviour is gone, and re-run it; give staleBecause for it \u2014 the requirement the"," change deliberately alters and the changed line of application code (path:line) that alters it. One that catches"," something the change breaks is a defect: leave it failing and report it. Leave alone failures the change did not cause.","5. If the repo has a linter or formatter for test code, run it on your files. The application's manifests and"," lockfiles are its owner's: a test in the repo's own framework uses only what the repo already declares, and you"," never add, upgrade or remove a package in the application's own manifests or lockfiles for Testbot's tests.",A?" For the app's code, reach it the way the repo's in-process tests do (its test client, fixtures and helpers).":" For calls to the app, use the client and helpers the repo's existing tests use for that service."," Tooling the repo doesn't declare (Playwright where it has none) goes in the Testbot test package"," above, never in the application's manifests; with no such package, write the test with what the repo has."," The one exception is a test that must run inside the application's existing test environment and cannot"," without a package it lacks: add it to the manifest of the checkout the test is in, keep the manifest's"," constraints, upgrade nothing else, update that manifest's lockfile with its own package manager (the updated lockfile"," must name the added package), run the existing tests of that environment, and list it in dependenciesAdded"," with the reason; for another checkout of the change, name that checkout as the entry's repository.","",'In your result, give each file you added or updated its "functions": each test function in it as the runner names',"it, with the plan case ids it checks, so that every case it covers is checked by a function you name. Give each","issue its plan finding id and the requirement or clause ids it violates. Name each test for what it checks: no plan","id in a test's name or title, except a label the description or spec itself gives the requirement (AC-3).","","Apart from that scratch copy, stay inside the checkout and leave it on the commit it is on,","with the change's files in place: run or read the base in the scratch copy (or with git show <commit>:<file>), never","by checking the checkout out, resetting or stashing it. Don't commit or push, and leave the tests in the working tree.",`Once you've run the tests the first time, write your result as JSON (below) to ${e.checkpoint}, and keep it current`,"as you go: that file is what's","read. End with a one-line final message \u2014 don't repeat the JSON in it. The report is read by the PR author: describe","their code, not this process.","",yn(so)].join(`
|
|
803
|
+
`)});return["Write functional tests for this PR and run them. The plan below came from reading the PR; turn it into tests in the","repo, run them, and tell me what they show about the change.","",`The repo is at ${r}, checked out on branch \`${s}\`. You can see the change with \`git diff ${i}...HEAD\`.`,...EAe(t),...zl(t.inputs),"",...dmt(t.inputs),...mmt(t.inputs),...a?.requirements?.length?["Requirements:",...a.requirements.map(v=>` - ${v.id}${m.get(v.id)??""}: ${v.statement}`),""]:[],...l.length?["Defects suspected while reading the change:",...l.map(v=>` - ${v.id} (${v.severity}) ${v.file}${v.line?`:${v.line}`:""} \u2014 ${v.claim}`),""]:[],"Test plan. Each case's expected outcome is the one the plan sets, not whatever the app does:",...C.length?C:[" (no new cases)"],...o.maintenance.length?["","Existing tests to maintain:",...o.maintenance.map(v=>` - ${v.action.toUpperCase()} ${v.test} \u2014 ${v.evidence}`)]:[],"",...A?fxr(E):[],...cxr(y,{noApp:A}),...A?mxr(t):pxr(t),...h?["For the ui cases you have the Skyramp browser tools (mcp__skyramp__browser_*): look at the real page before you pick locators."]:[],...e.provisionNotes.length?[`Setup notes: ${e.provisionNotes.join("; ")}`]:[],...e.testPackages?.length?["",...nct(e.testPackages,{skyrampVersion:bh(t)&&!A?yR(t.inputs.skyrampMcp):void 0,nodeTests:(A||o.generate.some(v=>v.type!=="ui"))&&Mge(r)})]:[],...e.sharedHelpers?.length?["",...e.sharedHelpers]:[],...hxr(r,t.providedEnvKeys??[]),"","1. Write each test the way the repo already tests that code (the same kind of test, framework, directories, naming,",...A?[" helpers and fixtures), unless that kind cannot check its case in one process; then use the in-process kind that can,"," and where none can, list the case under notWritten with what it needs."]:[" helpers and fixtures), unless that kind of test cannot check its case; then use the kind that can."]," Reuse the repo's helpers, page objects and fixtures: never copy a helper the repo already has \u2014 import it, and if it"," is local to another test file, move it into the repo's shared support module and import it in both. A helper only"," one test file uses stays in that file; a helper two or more of your test files use is defined once, in the repo's"," shared support location (else beside the tests that use it, the way the repo lays out its tests), in a module named for what it holds \u2014 not",` "utils" or "Skyramp". Use every name you import. Where the repo's browser tests reach its pages through page objects,`," so do yours: locate a page's elements in its page object, the way its existing members locate theirs, and add a page"," object, where the repo keeps them, for a page that has none. Find an element by its role and name, label or test id;"," when a locator matches more than one element, narrow it to the one you mean (inside its row, dialog or region, or by"," its text) rather than taking .first(), .last() or .nth(). Pick by position only where the order is what the test checks.",...A?[" Write in-process tests the way the repo's own unit and in-process tests are written. The repo's existing tests"]:[" Don't add unit tests (a function or module called directly, its collaborators mocked). The repo's existing tests"]," are for maintenance only: update the ones the change makes wrong \u2014 the maintenance list is where to start, step 4"," finds the rest \u2014 above all any that assert as correct what the plan says is a defect, rather than writing a new"," one beside it."," Keep each requirement's check on its own, so one failure can't hide another: give it its own test or assertion,"," and stub or seed any data its setup needs that a different defect could break (a list the page loads, a shared"," helper that rejects the response before your assertion reads it). A test that shows a defect asserts only the"," outcome its case expects \u2014 one defect per test \u2014 so it passes once that defect is fixed."," For each element or field the change adds, assert that it is there (shown, or present in the response); clicking"," or filling it is not an assertion. For each it removes or renames, assert that it is gone: not shown, a count of 0,"," the field missing, a 404, the old option no longer offered."," Where a case's steps give the exact requests, send them as they are rather than working them out again, and keep"," those tests together in one file."," The plan is where to start, not the limit: if you notice something else the change should do, or could break,"," while you write and run these, test that too; a test of what it could break stays only if it fails on the change,"," so remove one that passes and list its case under notWritten as passing \u2014 never a journey's test, which stays whether it"," passes or fails. Where nothing says what should happen, only decide it for what"," the change does; how older code treats odd input is not this PR's to test. One case for each kind of input is"," enough: add another only where it could fail while the first passes.","2. Run the tests you wrote together, once, in the foreground, with a short per-test timeout so a hung test fails"," fast; wait for the run to finish, and don't end the session with a test run still going.","3. For each failure, work out whose fault it is. If the test checks what its case expects and the app does something"," else, that's a defect in the change: keep the test as written, mark it as a defect, and report the bug. Never change"," an expected outcome to match what the app does. If the test itself is wrong (selector, setup, data, import, timing),"," fix it and re-run only the tests that failed (e.g. pytest --lf, playwright test --last-failed, or by name). Don't"," re-run the whole set at the end: the results you already have stand.","4. Then run the repo's existing tests that reach the code the change touches, the way its CI runs them (its command"," and environment), selected as narrowly as still covers that code: the whole suite only when it runs in a few"," minutes. For each one that fails, find out whether this change made it fail; when you can't tell, run it on the"," base branch in a scratch copy outside the"," checkout (e.g. git worktree add under /tmp). One that asserts behaviour the change deliberately replaced is stale:"," update it, or delete it where the behaviour is gone, and re-run it; give staleBecause for it \u2014 the requirement the"," change deliberately alters and the changed line of application code (path:line) that alters it. One that catches"," something the change breaks is a defect: leave it failing and report it. Leave alone failures the change did not cause.","5. If the repo has a linter or formatter for test code, run it on your files. The application's manifests and"," lockfiles are its owner's: a test in the repo's own framework uses only what the repo already declares, and you"," never add, upgrade or remove a package in the application's own manifests or lockfiles for Testbot's tests.",A?" For the app's code, reach it the way the repo's in-process tests do (its test client, fixtures and helpers).":" For calls to the app, use the client and helpers the repo's existing tests use for that service."," Tooling the repo doesn't declare (Playwright where it has none) goes in the Testbot test package"," above, never in the application's manifests; with no such package, write the test with what the repo has."," The one exception is a test that must run inside the application's existing test environment and cannot"," without a package it lacks: add it to the manifest of the checkout the test is in, keep the manifest's"," constraints, upgrade nothing else, update that manifest's lockfile with its own package manager (the updated lockfile"," must name the added package), run the existing tests of that environment, and list it in dependenciesAdded"," with the reason; for another checkout of the change, name that checkout as the entry's repository.","",'In your result, give each file you added or updated its "functions": each test function in it as the runner names',"it, with the plan case ids it checks, so that every case it covers is checked by a function you name. Give each","issue its plan finding id and the requirement or clause ids it violates. Name each test for what it checks: no plan","id in a test's name or title, except a label the description or spec itself gives the requirement (AC-3).","","Apart from that scratch copy, stay inside the checkout and leave it on the commit it is on,","with the change's files in place: run or read the base in the scratch copy (or with git show <commit>:<file>), never","by checking the checkout out, resetting or stashing it. Don't commit or push, and leave the tests in the working tree.",`Once you've run the tests the first time, write your result as JSON (below) to ${e.checkpoint}, and keep it current`,"as you go: that file is what's","read. End with a one-line final message \u2014 don't repeat the JSON in it. The report is read by the PR author: describe","their code, not this process.","",yn(so)].join(`
|
|
804
804
|
`)}function KD(t,e,r){let n=bs.join(t.outputsDir,e);return Yc.writeFileSync(n,JSON.stringify(Xr(r,t.secretValues??[]),null,2)+`
|
|
805
805
|
`),bs.relative(t.runDir,n)}function tft(t,e){let r=e.dependenciesAdded??[],n=t.prepared?.dependencyBaseline??new Set;return[...QV(t,r,n),...npt(t)]}var Axr={name:Xmt,verify(t,e){let{value:r}=$i(so,e.stdout,Ai(t),t.secretValues);if(!r)return{name:this.name,passed:!0};let n=tft(t,r);return n.length?{...Ie(this.name,n),repairable:!0}:{name:this.name,passed:!0}}};function yxr(t,e){let r=ce(t,zc);if(!r)return[];let n=e.tests.map(i=>i.file),s=r.packages.filter(i=>{try{let o=rct(t.inputs.repositoryPath,i,n);return o&&cd(t).info(`[write] no test went in the new test package ${i.dir}: removed it`),!o}catch{return!0}});return eft(t,s),s}function bxr(t,e){let r=ma(t)?jmt(e,KR(t).browserJourneys):e;yxr(t,r);let n=Pat(r,t.inputs.repositoryPath,t.inputs.relatedRepos??[]),s=tft(t,r);return s.length&&(n.finalize.ready=!1,n.finalize.blockers=[...n.finalize.blockers,...s.slice(0,4)]),n.dropped.length&&cd(t).warn(`[write] not on disk, left out of adapt.json: ${n.dropped.join(", ")}`),n.ambiguous.length&&cd(t).warn(`[write] in both the repo under test and a related checkout, kept the repo under test's: ${n.ambiguous.join(", ")}`),{artifacts:{write:KD(t,"write.json",r),adapt:KD(t,"adapt.json",n.adapt),generate:KD(t,"generate.json",n.generate),"generate-ui":KD(t,"generate-ui.json",n.generateUi),finalize:KD(t,"finalize.json",n.finalize)},placed:n.placed}}async function rft(t,e){let{artifacts:r,placed:n}=bxr(t,e);if(ma(t))return r;let s=new Map(n.map(o=>[o.written,o])),i=await qpt({write:e,outputsDir:t.outputsDir,resolve:o=>{let a=s.get(o),c=a&&bs.resolve(a.root,a.file);return a&&c&&Yc.existsSync(c)&&Yc.statSync(c).isFile()?{abs:c,root:bs.resolve(a.root),file:a.file,...a.repository?{repository:a.repository}:{}}:void 0},env:{...nft(t)??{},...t.sutAuthEnv??{}},...t.deadlineMs!==void 0?{deadlineMs:t.deadlineMs}:{},...t.signal?{signal:t.signal}:{}}).catch(o=>{cd(t).warn(`[write] recording the browser tests' videos failed: ${o instanceof Error?o.message:String(o)}`)});return i?.skipped.length&&cd(t).info(`[write] no video for ${i.skipped.map(o=>`${o.fileName} (${o.reason})`).join(", ")}`),{...r,...i?{"ui-videos":bs.relative(t.runDir,bs.join(t.outputsDir,Fh))}:{}}}function nft(t){try{return CV(_h(Zl(t.inputs.repositoryPath)))}catch{return}}var sft="write-stale-updates",Exr={name:sft,verify(t,e){let{value:r}=$i(so,e.stdout,Ai(t),t.secretValues);if(!r)return{name:this.name,passed:!0};let n=[{path:t.inputs.repositoryPath,prefix:""},...(t.inputs.relatedRepos??[]).map(f=>({path:f.path,prefix:`${bs.basename(bs.resolve(f.path))}/`}))].flatMap(({path:f,prefix:h})=>{try{return(0,Ymt.execFileSync)("git",["-C",f,"diff","--name-only","--diff-filter=d","HEAD"],{encoding:"utf-8"}).split(`
|
|
806
806
|
`).filter(A=>A&&SR(A)&&!A.startsWith(".skyramp/")).map(A=>h+A)}catch{return[]}}),s=r.tests.filter(f=>f.change!=="added"&&f.change!=="deleted").map(f=>({file:f.file,changed:f.change!=="unchanged",ran:f.result.exit!==null})),i=Rct(n,s),o=r.tests.filter(f=>f.change==="updated");if(!o.length)return Yc.writeFileSync(bs.join(t.outputsDir,IR),`[]
|
package/dist/post.js
CHANGED
|
@@ -587,7 +587,7 @@ ${Jkt(t,e)}`}function Jkt(t,e){if(t.inputs.appRunning)return[`${t.inputs.appRunn
|
|
|
587
587
|
`)}function yNt(t){try{return HOe(je(t.inputs).flatMap(e=>{let r=e.path===t.inputs.repositoryPath?"":Xe(t.inputs,e.slug);return GOe(e.path).map(n=>({label:r,module:n}))}))}catch{return[]}}function ENt(t){let e=no(t.inputs)?["It is a shared environment this policy protects: write and run no test that changes state there (a create, edit or delete, a form that submits, a setup that seeds); list any such test in notWritten instead."]:[];if(t.inputs.appRunning){let o=tQ(ee(t,`${Vs}.json`));return[t.inputs.appRunning.trim(),...e,...o?[o]:[]]}let r=ee(t,"deploy.json"),n=go(t.inputs.repositoryPath),s=n.setupScript?`start it with ${jr.relative(t.inputs.repositoryPath,n.setupScript)} and check it answers`:"start it the way the repo documents";if(c8(r)){let o=Object.entries(r.baseUrls??{}).map(([c,l])=>`${c} ${l}`).join(", "),a=r.health?.url??r.health?.command;return[`The app is running${o?`: ${o}`:""}.${a?` Health check: ${a}`:""}`,`If it stops answering, ${s}.`]}return[`The app may not be running.${r?.bringupError?.output?` Planning could not start it: ${r.bringupError.output.slice(0,300)}`:""} Check, and if it isn't up, ${s}; leave it running.`,"If you can't get it running, still write the tests and record them as not run (exit null)."]}function bNt(t){let e=l6(t);return["No app is running, and none is started for this run: Validation Triage decided the change is proven in-process","(targeted_unit). Every test runs in one process, the way the repo's own in-process tests run: no network or running","app, so nothing that calls a live service, the Skyramp client and its runtime mocks included. Mock outbound calls","(HTTP, queues, other services) inside the test with the repo's own fixtures and mocking tools. Run the tests the way","the repo's CI runs them (its runner, config and environment), selected as step 4 says. Each new test file is named the way its runner","collects tests, as the repo's own tests are. Maintain every stale existing test that can run in-process. An existing","test that needs the running app goes under notWritten, by its path, with what it needs that this run does not have:","it is reported as not covered.",...e.length?["The Target puts new unit tests in these directories, over the repo's own layout: put each new test under its repository's directory, not beside the existing tests:",...e.map(r=>` - ${Xe(t.inputs,r.slug)}${r.dir}/`)]:[]]}function wNt(t){return[...t.behaviors.length?['Behaviors that need a new in-process test (give each id in "covers"):',...t.behaviors.map(e=>` - ${e.id}: ${e.statement}
|
|
588
588
|
missing evidence to obtain: ${e.covers||"(unstated)"}
|
|
589
589
|
where the change is: ${e.where}`),"Every behavior above gets an in-process test, except that a test of what the change could break stays only if it","fails on the change (step 1).",""]:[],...t.defects.length?["For each defect suspected above, write a test that reaches it and expects the correct behaviour, so it fails on this","change and passes once the defect is fixed, and give its id in covers; a defect no in-process test can reach goes","under notWritten, with why.",""]:[],...t.browserJourneys.length?["These user journeys need a browser and the running app, which this run does not have: no in-process test can walk","them, so each goes under notWritten by its id, with what it needs that is missing:",...t.browserJourneys.map(e=>` - ${e.id} ${e.name}`),""]:[]]}function CNt(t,e=[]){let r="";try{let n=ua(t,e),s=[...new Set(n.flatMap(i=>i.secretEnv))].filter(i=>e.includes(i));r=tQe(cd(n),s).trim()}catch{return[]}return r?["Some variables the repo's CI sets would clash with your own model access, so their values are in your shell",`renamed, under a TESTBOT_CI_ prefix. Run a test that needs CI's values with them mapped back: \`${r} <test command>\`.`]:[]}function SNt(t){let e=t.prepared,r=t.inputs.repositoryPath,n=Ir(t),s=n?.repository.currentBranch??"HEAD",i=n?.repository.baseBranch??t.inputs.baseBranch??"origin/main",o=Gt(t),a=ee(t,"analyze.json"),c=new Map((a?.behaviors??[]).map(v=>[v.id,v.statement])),l=(a?.findings??[]).filter(v=>v.status!=="refuted"),u=ee(t,"plan.json"),d=new Map((u?.cases??[]).map(v=>[v.id,v.steps])),p=js(t.inputs.requirementItems),f=new Map((u?.requirements??[]).flatMap(v=>v.reference&&v.criterion?[[v.id,` (${Al(v.reference,v.criterion,p)})`]]:[])),g=rO(t)&&Yu(t),C=wi(t),w=Cb(t),E=nMe(t),I=new Set(E.map(v=>v.id)),x=o.generate.filter(v=>!I.has(v.id)).map(v=>{let Q=[v.from_behavior&&`${v.from_behavior}: ${c.get(v.from_behavior)??""}`.trim(),v.from_finding&&`defect ${v.from_finding}`].filter(Boolean).join("; ");return[` - ${v.id} [${v.type}] ${v.target}${Q?` \u2014 ${Q}`:""}`,` do: ${d.get(v.id)??v.rationale}`,` expect: ${v.expected_observable}`].join(`
|
|
590
|
-
`)});return["Write functional tests for this PR and run them. The plan below came from reading the PR; turn it into tests in the","repo, run them, and tell me what they show about the change.","",`The repo is at ${r}, checked out on branch \`${s}\`. You can see the change with \`git diff ${i}...HEAD\`.`,...X5(t),...ra(t.inputs),"",...mOe(t.inputs),...AOe(t.inputs),...a?.requirements?.length?["Requirements:",...a.requirements.map(v=>` - ${v.id}${f.get(v.id)??""}: ${v.statement}`),""]:[],...l.length?["Defects suspected while reading the change:",...l.map(v=>` - ${v.id} (${v.severity}) ${v.file}${v.line?`:${v.line}`:""} \u2014 ${v.claim}`),""]:[],"Test plan. Each case's expected outcome is the one the plan sets, not whatever the app does:",...x.length?x:[" (no new cases)"],...o.maintenance.length?["","Existing tests to maintain:",...o.maintenance.map(v=>` - ${v.action.toUpperCase()} ${v.test} \u2014 ${v.evidence}`)]:[],"",...C?wNt(w):[],...mNt(E,{noApp:C}),...C?bNt(t):ENt(t),...g?["For the ui cases you have the Skyramp browser tools (mcp__skyramp__browser_*): look at the real page before you pick locators."]:[],...e.provisionNotes.length?[`Setup notes: ${e.provisionNotes.join("; ")}`]:[],...e.testPackages?.length?["",...i_e(e.testPackages,{skyrampVersion:Yu(t)&&!C?qE(t.inputs.skyrampMcp):void 0,nodeTests:(C||o.generate.some(v=>v.type!=="ui"))&&h5(r)})]:[],...e.sharedHelpers?.length?["",...e.sharedHelpers]:[],...CNt(r,t.providedEnvKeys??[]),"","1. Write each test the way the repo already tests that code (the same kind of test, framework, directories, naming,",...C?[" helpers and fixtures), unless that kind cannot check its case in one process; then use the in-process kind that can,"," and where none can, list the case under notWritten with what it needs."]:[" helpers and fixtures), unless that kind of test cannot check its case; then use the kind that can."]," Reuse the repo's helpers, page objects and fixtures: never copy a helper the repo already has \u2014 import it, and if it"," is local to another test file, move it into the repo's shared support module and import it in both. A helper only"," one test file uses stays in that file; a helper two or more of your test files use is defined once, in the repo's"," shared support location (else beside the tests that use it, the way the repo lays out its tests), in a module named for what it holds \u2014 not",` "utils" or "Skyramp". Use every name you import. Where the repo's browser tests reach its pages through page objects,`," so do yours: locate a page's elements in its page object, the way its existing members locate theirs, and add a page"," object, where the repo keeps them, for a page that has none.",...C?[" Write in-process tests the way the repo's own unit and in-process tests are written. The repo's existing tests"]:[" Don't add unit tests (a function or module called directly, its collaborators mocked). The repo's existing tests"]," are for maintenance only: update the ones the change makes wrong \u2014 the maintenance list is where to start, step 4"," finds the rest \u2014 above all any that assert as correct what the plan says is a defect, rather than writing a new"," one beside it."," Keep each requirement's check on its own, so one failure can't hide another: give it its own test or assertion,"," and stub or seed any data its setup needs that a different defect could break (a list the page loads, a shared"," helper that rejects the response before your assertion reads it). A test that shows a defect asserts only the"," outcome its case expects \u2014 one defect per test \u2014 so it passes once that defect is fixed."," For each element or field the change adds, assert that it is there (shown, or present in the response); clicking"," or filling it is not an assertion. For each it removes or renames, assert that it is gone: not shown, a count of 0,"," the field missing, a 404, the old option no longer offered."," Where a case's steps give the exact requests, send them as they are rather than working them out again, and keep"," those tests together in one file."," The plan is where to start, not the limit: if you notice something else the change should do, or could break,"," while you write and run these, test that too; a test of what it could break stays only if it fails on the change,"," so remove one that passes and list its case under notWritten as passing \u2014 never a journey's test, which stays whether it"," passes or fails. Where nothing says what should happen, only decide it for what"," the change does; how older code treats odd input is not this PR's to test. One case for each kind of input is"," enough: add another only where it could fail while the first passes.","2. Run the tests you wrote together, once, in the foreground, with a short per-test timeout so a hung test fails"," fast; wait for the run to finish, and don't end the session with a test run still going.","3. For each failure, work out whose fault it is. If the test checks what its case expects and the app does something"," else, that's a defect in the change: keep the test as written, mark it as a defect, and report the bug. Never change"," an expected outcome to match what the app does. If the test itself is wrong (selector, setup, data, import, timing),"," fix it and re-run only the tests that failed (e.g. pytest --lf, playwright test --last-failed, or by name). Don't"," re-run the whole set at the end: the results you already have stand.","4. Then run the repo's existing tests that reach the code the change touches, the way its CI runs them (its command"," and environment), selected as narrowly as still covers that code: the whole suite only when it runs in a few"," minutes. For each one that fails, find out whether this change made it fail; when you can't tell, run it on the"," base branch in a scratch copy outside the"," checkout (e.g. git worktree add under /tmp). One that asserts behaviour the change deliberately replaced is stale:"," update it, or delete it where the behaviour is gone, and re-run it; give staleBecause for it \u2014 the requirement the"," change deliberately alters and the changed line of application code (path:line) that alters it. One that catches"," something the change breaks is a defect: leave it failing and report it. Leave alone failures the change did not cause.","5. If the repo has a linter or formatter for test code, run it on your files. The application's manifests and"," lockfiles are its owner's: a test in the repo's own framework uses only what the repo already declares, and you"," never add, upgrade or remove a package in the application's own manifests or lockfiles for Testbot's tests.",C?" For the app's code, reach it the way the repo's in-process tests do (its test client, fixtures and helpers).":" For calls to the app, use the client and helpers the repo's existing tests use for that service."," Tooling the repo doesn't declare (Playwright where it has none) goes in the Testbot test package"," above, never in the application's manifests; with no such package, write the test with what the repo has."," The one exception is a test that must run inside the application's existing test environment and cannot"," without a package it lacks: add it to the manifest of the checkout the test is in, keep the manifest's"," constraints, upgrade nothing else, update that manifest's lockfile with its own package manager (the updated lockfile"," must name the added package), run the existing tests of that environment, and list it in dependenciesAdded"," with the reason; for another checkout of the change, name that checkout as the entry's repository.","",'In your result, give each file you added or updated its "functions": each test function in it as the runner names',"it, with the plan case ids it checks, so that every case it covers is checked by a function you name. Give each","issue its plan finding id and the requirement or clause ids it violates. Name each test for what it checks: no plan","id in a test's name or title, except a label the description or spec itself gives the requirement (AC-3).","","Apart from that scratch copy, stay inside the checkout and leave it on the commit it is on,","with the change's files in place: run or read the base in the scratch copy (or with git show <commit>:<file>), never","by checking the checkout out, resetting or stashing it. Don't commit or push, and leave the tests in the working tree.",`Once you've run the tests the first time, write your result as JSON (below) to ${e.checkpoint}, and keep it current`,"as you go: that file is what's","read. End with a one-line final message \u2014 don't repeat the JSON in it. The report is read by the PR author: describe","their code, not this process.","",or(ss)].join(`
|
|
590
|
+
`)});return["Write functional tests for this PR and run them. The plan below came from reading the PR; turn it into tests in the","repo, run them, and tell me what they show about the change.","",`The repo is at ${r}, checked out on branch \`${s}\`. You can see the change with \`git diff ${i}...HEAD\`.`,...X5(t),...ra(t.inputs),"",...mOe(t.inputs),...AOe(t.inputs),...a?.requirements?.length?["Requirements:",...a.requirements.map(v=>` - ${v.id}${f.get(v.id)??""}: ${v.statement}`),""]:[],...l.length?["Defects suspected while reading the change:",...l.map(v=>` - ${v.id} (${v.severity}) ${v.file}${v.line?`:${v.line}`:""} \u2014 ${v.claim}`),""]:[],"Test plan. Each case's expected outcome is the one the plan sets, not whatever the app does:",...x.length?x:[" (no new cases)"],...o.maintenance.length?["","Existing tests to maintain:",...o.maintenance.map(v=>` - ${v.action.toUpperCase()} ${v.test} \u2014 ${v.evidence}`)]:[],"",...C?wNt(w):[],...mNt(E,{noApp:C}),...C?bNt(t):ENt(t),...g?["For the ui cases you have the Skyramp browser tools (mcp__skyramp__browser_*): look at the real page before you pick locators."]:[],...e.provisionNotes.length?[`Setup notes: ${e.provisionNotes.join("; ")}`]:[],...e.testPackages?.length?["",...i_e(e.testPackages,{skyrampVersion:Yu(t)&&!C?qE(t.inputs.skyrampMcp):void 0,nodeTests:(C||o.generate.some(v=>v.type!=="ui"))&&h5(r)})]:[],...e.sharedHelpers?.length?["",...e.sharedHelpers]:[],...CNt(r,t.providedEnvKeys??[]),"","1. Write each test the way the repo already tests that code (the same kind of test, framework, directories, naming,",...C?[" helpers and fixtures), unless that kind cannot check its case in one process; then use the in-process kind that can,"," and where none can, list the case under notWritten with what it needs."]:[" helpers and fixtures), unless that kind of test cannot check its case; then use the kind that can."]," Reuse the repo's helpers, page objects and fixtures: never copy a helper the repo already has \u2014 import it, and if it"," is local to another test file, move it into the repo's shared support module and import it in both. A helper only"," one test file uses stays in that file; a helper two or more of your test files use is defined once, in the repo's"," shared support location (else beside the tests that use it, the way the repo lays out its tests), in a module named for what it holds \u2014 not",` "utils" or "Skyramp". Use every name you import. Where the repo's browser tests reach its pages through page objects,`," so do yours: locate a page's elements in its page object, the way its existing members locate theirs, and add a page"," object, where the repo keeps them, for a page that has none. Find an element by its role and name, label or test id;"," when a locator matches more than one element, narrow it to the one you mean (inside its row, dialog or region, or by"," its text) rather than taking .first(), .last() or .nth(). Pick by position only where the order is what the test checks.",...C?[" Write in-process tests the way the repo's own unit and in-process tests are written. The repo's existing tests"]:[" Don't add unit tests (a function or module called directly, its collaborators mocked). The repo's existing tests"]," are for maintenance only: update the ones the change makes wrong \u2014 the maintenance list is where to start, step 4"," finds the rest \u2014 above all any that assert as correct what the plan says is a defect, rather than writing a new"," one beside it."," Keep each requirement's check on its own, so one failure can't hide another: give it its own test or assertion,"," and stub or seed any data its setup needs that a different defect could break (a list the page loads, a shared"," helper that rejects the response before your assertion reads it). A test that shows a defect asserts only the"," outcome its case expects \u2014 one defect per test \u2014 so it passes once that defect is fixed."," For each element or field the change adds, assert that it is there (shown, or present in the response); clicking"," or filling it is not an assertion. For each it removes or renames, assert that it is gone: not shown, a count of 0,"," the field missing, a 404, the old option no longer offered."," Where a case's steps give the exact requests, send them as they are rather than working them out again, and keep"," those tests together in one file."," The plan is where to start, not the limit: if you notice something else the change should do, or could break,"," while you write and run these, test that too; a test of what it could break stays only if it fails on the change,"," so remove one that passes and list its case under notWritten as passing \u2014 never a journey's test, which stays whether it"," passes or fails. Where nothing says what should happen, only decide it for what"," the change does; how older code treats odd input is not this PR's to test. One case for each kind of input is"," enough: add another only where it could fail while the first passes.","2. Run the tests you wrote together, once, in the foreground, with a short per-test timeout so a hung test fails"," fast; wait for the run to finish, and don't end the session with a test run still going.","3. For each failure, work out whose fault it is. If the test checks what its case expects and the app does something"," else, that's a defect in the change: keep the test as written, mark it as a defect, and report the bug. Never change"," an expected outcome to match what the app does. If the test itself is wrong (selector, setup, data, import, timing),"," fix it and re-run only the tests that failed (e.g. pytest --lf, playwright test --last-failed, or by name). Don't"," re-run the whole set at the end: the results you already have stand.","4. Then run the repo's existing tests that reach the code the change touches, the way its CI runs them (its command"," and environment), selected as narrowly as still covers that code: the whole suite only when it runs in a few"," minutes. For each one that fails, find out whether this change made it fail; when you can't tell, run it on the"," base branch in a scratch copy outside the"," checkout (e.g. git worktree add under /tmp). One that asserts behaviour the change deliberately replaced is stale:"," update it, or delete it where the behaviour is gone, and re-run it; give staleBecause for it \u2014 the requirement the"," change deliberately alters and the changed line of application code (path:line) that alters it. One that catches"," something the change breaks is a defect: leave it failing and report it. Leave alone failures the change did not cause.","5. If the repo has a linter or formatter for test code, run it on your files. The application's manifests and"," lockfiles are its owner's: a test in the repo's own framework uses only what the repo already declares, and you"," never add, upgrade or remove a package in the application's own manifests or lockfiles for Testbot's tests.",C?" For the app's code, reach it the way the repo's in-process tests do (its test client, fixtures and helpers).":" For calls to the app, use the client and helpers the repo's existing tests use for that service."," Tooling the repo doesn't declare (Playwright where it has none) goes in the Testbot test package"," above, never in the application's manifests; with no such package, write the test with what the repo has."," The one exception is a test that must run inside the application's existing test environment and cannot"," without a package it lacks: add it to the manifest of the checkout the test is in, keep the manifest's"," constraints, upgrade nothing else, update that manifest's lockfile with its own package manager (the updated lockfile"," must name the added package), run the existing tests of that environment, and list it in dependenciesAdded"," with the reason; for another checkout of the change, name that checkout as the entry's repository.","",'In your result, give each file you added or updated its "functions": each test function in it as the runner names',"it, with the plan case ids it checks, so that every case it covers is checked by a function you name. Give each","issue its plan finding id and the requirement or clause ids it violates. Name each test for what it checks: no plan","id in a test's name or title, except a label the description or spec itself gives the requirement (AC-3).","","Apart from that scratch copy, stay inside the checkout and leave it on the commit it is on,","with the change's files in place: run or read the base in the scratch copy (or with git show <commit>:<file>), never","by checking the checkout out, resetting or stashing it. Don't commit or push, and leave the tests in the working tree.",`Once you've run the tests the first time, write your result as JSON (below) to ${e.checkpoint}, and keep it current`,"as you go: that file is what's","read. End with a one-line final message \u2014 don't repeat the JSON in it. The report is read by the PR author: describe","their code, not this process.","",or(ss)].join(`
|
|
591
591
|
`)}function ov(t,e,r){let n=jr.join(t.outputsDir,e);return yo.writeFileSync(n,JSON.stringify(hr(r,t.secretValues??[]),null,2)+`
|
|
592
592
|
`),jr.relative(t.runDir,n)}function iMe(t,e){let r=e.dependenciesAdded??[],n=t.prepared?.dependencyBaseline??new Set;return[...QD(t,r,n),...oDe(t)]}var INt={name:rMe,verify(t,e){let{value:r}=jn(ss,e.stdout,In(t),t.secretValues);if(!r)return{name:this.name,passed:!0};let n=iMe(t,r);return n.length?{...ce(this.name,n),repairable:!0}:{name:this.name,passed:!0}}};function xNt(t,e){let r=ee(t,fo);if(!r)return[];let n=e.tests.map(i=>i.file),s=r.packages.filter(i=>{try{let o=s_e(t.inputs.repositoryPath,i,n);return o&&oc(t).info(`[write] no test went in the new test package ${i.dir}: removed it`),!o}catch{return!0}});return sMe(t,s),s}function vNt(t,e){let r=wi(t)?JOe(e,Cb(t).browserJourneys):e;xNt(t,r);let n=QNe(r,t.inputs.repositoryPath,t.inputs.relatedRepos??[]),s=iMe(t,r);return s.length&&(n.finalize.ready=!1,n.finalize.blockers=[...n.finalize.blockers,...s.slice(0,4)]),n.dropped.length&&oc(t).warn(`[write] not on disk, left out of adapt.json: ${n.dropped.join(", ")}`),n.ambiguous.length&&oc(t).warn(`[write] in both the repo under test and a related checkout, kept the repo under test's: ${n.ambiguous.join(", ")}`),{artifacts:{write:ov(t,"write.json",r),adapt:ov(t,"adapt.json",n.adapt),generate:ov(t,"generate.json",n.generate),"generate-ui":ov(t,"generate-ui.json",n.generateUi),finalize:ov(t,"finalize.json",n.finalize)},placed:n.placed}}async function oMe(t,e){let{artifacts:r,placed:n}=vNt(t,e);if(wi(t))return r;let s=new Map(n.map(o=>[o.written,o])),i=await VDe({write:e,outputsDir:t.outputsDir,resolve:o=>{let a=s.get(o),c=a&&jr.resolve(a.root,a.file);return a&&c&&yo.existsSync(c)&&yo.statSync(c).isFile()?{abs:c,root:jr.resolve(a.root),file:a.file,...a.repository?{repository:a.repository}:{}}:void 0},env:{...aMe(t)??{},...t.sutAuthEnv??{}},...t.deadlineMs!==void 0?{deadlineMs:t.deadlineMs}:{},...t.signal?{signal:t.signal}:{}}).catch(o=>{oc(t).warn(`[write] recording the browser tests' videos failed: ${o instanceof Error?o.message:String(o)}`)});return i?.skipped.length&&oc(t).info(`[write] no video for ${i.skipped.map(o=>`${o.fileName} (${o.reason})`).join(", ")}`),{...r,...i?{"ui-videos":jr.relative(t.runDir,jr.join(t.outputsDir,fd))}:{}}}function aMe(t){try{return wD(cd(ua(t.inputs.repositoryPath)))}catch{return}}var cMe="write-stale-updates",RNt={name:cMe,verify(t,e){let{value:r}=jn(ss,e.stdout,In(t),t.secretValues);if(!r)return{name:this.name,passed:!0};let n=[{path:t.inputs.repositoryPath,prefix:""},...(t.inputs.relatedRepos??[]).map(h=>({path:h.path,prefix:`${jr.basename(jr.resolve(h.path))}/`}))].flatMap(({path:h,prefix:g})=>{try{return(0,ZOe.execFileSync)("git",["-C",h,"diff","--name-only","--diff-filter=d","HEAD"],{encoding:"utf-8"}).split(`
|
|
593
593
|
`).filter(C=>C&&VE(C)&&!C.startsWith(".skyramp/")).map(C=>g+C)}catch{return[]}}),s=r.tests.filter(h=>h.change!=="added"&&h.change!=="deleted").map(h=>({file:h.file,changed:h.change!=="unchanged",ran:h.result.exit!==null})),i=k_e(n,s),o=r.tests.filter(h=>h.change==="updated");if(!o.length)return yo.writeFileSync(jr.join(t.outputsDir,YE),`[]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyramp/testbot-core",
|
|
3
|
-
"version": "0.13.0-v3.
|
|
3
|
+
"version": "0.13.0-v3.113",
|
|
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. dist/VERSION.json exists only in a release-engine.yml build. assets/gen-reference/ is the staged codegen reference corpus, which generate.ts finds at ../assets from dist/.",
|