You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(agent): add unit tests for copyDagSchedulePlan (#500) - #516
One fixture change before merge: the production scheduler gives an exclusive entry canonicalClaims: [] (scheduler, #500 context). On 8d26f5f, the canonical-claims test fills and mutates those claims on the exclusive entry at index 0. Please keep that array empty (and assert it stays empty in the copy), and move the canonical-claim mutation and original-value assertion to the claims entry at index 1. No runtime change needed. The checked CI run is green for the current synthetic fixture; the requested change makes the test cover the scheduler's actual plan shape.
Please also use valid levels for this two-entry fixture, e.g. [[0], [1]], and adjust the level-copy assertions. [[0, 1], [2]] puts another entry in an exclusive level and references a missing index; the scheduler emits exclusive entries alone.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #500.
Adds
packages/agent/test/tool-dag-plan-copy.test.ts(vitest, same style as the othertool-dag-*.test.tsfiles). No source files changed.Cases pinned, all built by hand from the issue:
toEqualto the original and keeps the sameplanKey(new array/object identities)copy.levels[0]does not changeplan.levels[0]copy.entries[1].resolution.claims[0].keydoes not change the original claimcopy.entries[0].canonicalClaimsdoes not change the originalexclusiveresolution stays exactly{ kind: "exclusive" }copyDagClaimEntries([])returns[]Tests run:
node ../../node_modules/vitest/dist/cli.js --run test/tool-dag-plan-copy.test.tsfrompackages/agent: 6 passed, 6 totalbiome checkon the new file: clean (one formatting fix applied)tsgo --noEmitfor the agent package: cleanFull
npm run checkfrom the repo root was not run locally; CI is arbiter for it.