-
Notifications
You must be signed in to change notification settings - Fork 0
fix(cli): worker-name collisions, negative positionals, fail-closed rendered workers, canonical result output #210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| "agent-bundle": patch | ||
| --- | ||
|
|
||
| Fail rendered CLI requests closed when their worker exits or progress | ||
| forwarding rejects, reserve generated Flight worker output names, accept | ||
| negative numeric positionals, and canonicalize command results only after | ||
| validating result-derived exit codes. |
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import { describe, expect, it } from '@rstest/core'; | ||
|
|
||
| import { runtimeIgnoredRoot } from '../src/build/entries.ts'; | ||
|
|
||
| describe('runtime ignored root', () => { | ||
| it('anchors a source runtime to its package when the checkout is under dist', () => { | ||
| expect(runtimeIgnoredRoot('/tmp/dist/checkout/packages/agent-bundle/src/cli-entry.ts')) | ||
| .toBe('/tmp/dist/checkout/packages/agent-bundle'); | ||
| }); | ||
|
|
||
| it('resolves the normal source layout', () => { | ||
| expect(runtimeIgnoredRoot('/work/agent-bundle/src/cli-entry.ts')) | ||
| .toBe('/work/agent-bundle'); | ||
| }); | ||
|
|
||
| it('resolves the normal installed distribution layout', () => { | ||
| expect(runtimeIgnoredRoot('/x/node_modules/agent-bundle/dist/cli-entry.js')) | ||
| .toBe('/x/node_modules/agent-bundle'); | ||
| }); | ||
|
|
||
| it('uses the runtime file parent when an earlier dist segment is present', () => { | ||
| expect(runtimeIgnoredRoot('/var/cache/dist/project/src/cli-entry.ts')) | ||
| .toBe('/var/cache/dist/project'); | ||
| }); | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the source checkout lives beneath a directory named
dist(for example,/tmp/dist/project/packages/agent-bundle/src/cli-entry.ts),runtimeIgnoredRootselects/dist/merely because it occurs anywhere in the path and returns/tmpinstead of the package root. Passing that ancestor here causes provenance collection to ignore every bundler-discovered transitive source under the consumer project, producing incompletesourceInputsfor rendered CLI artifacts. Determine the root from the innermost applicable/src/or/dist/marker rather than preferring any/dist/occurrence.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 7fd0e6e (merged to main as 1c36813): runtimeIgnoredRoot now anchors to the parent of the nearest src or dist ancestor of the runtime module itself instead of substring-matching any /dist/ segment, so a checkout living under a dist directory resolves the correct package root; an unmarked path is a loud error. Regression tests in entries.test.ts cover the stray-dist checkout, both normal layouts, and a mixed path.