[refactor]: Re-point NVMS parser from local to phenotype-tooling/nanovms/parser#230
[refactor]: Re-point NVMS parser from local to phenotype-tooling/nanovms/parser#230KooshaPari wants to merge 1 commit into
Conversation
|
CodeAnt AI is reviewing your PR. |
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
Legacy Tooling Scan Report
No violations detected. This is a WARN-mode scan. Fix before strict enforcement begins. |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6362ac3667
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| golang.org/x/sys v0.44.0 // indirect | ||
| ) | ||
|
|
||
| replace github.com/kooshapari/nanovms => ../../../phenotype-tooling/crates/nanovms |
There was a problem hiding this comment.
Pin the parser to an available module
In a normal BytePort checkout, this replacement resolves relative to backend/nvms/go.mod as /workspace/phenotype-tooling/crates/nanovms, which is not part of this repo; I checked the workspace and go list ./models reports replacement directory ../../../phenotype-tooling/crates/nanovms does not exist. Since the new imports in models/types.go and projectManager/parser.go depend on this module, the backend/nvms CI jobs that run go build ./... will fail unless every builder has a sibling phenotype-tooling checkout at exactly that path.
Useful? React with 👍 / 👎.
| golang.org/x/sys v0.44.0 // indirect | ||
| ) | ||
|
|
||
| replace github.com/kooshapari/nanovms => ../../../phenotype-tooling/crates/nanovms |
There was a problem hiding this comment.
Suggestion: The replace points to a local relative path outside this repository, so fresh checkouts/CI runners that only clone BytePort will fail module resolution (github.com/kooshapari/nanovms cannot be found). Use a resolvable module source for shared builds (published version or vendored/submodule path available in CI), or gate the local replace to developer-only workflows. [api mismatch]
Severity Level: Major ⚠️
- ❌ `backend/nvms` module fails to build standalone.
- ❌ Go tooling unusable without extra sibling repo checkout.
- ⚠️ CI runners cloning only BytePort may break builds.Steps of Reproduction ✅
1. Clone only the BytePort repository into a clean workspace so that the relative sibling
path `../../../phenotype-tooling/crates/nanovms` does not exist on disk.
2. From the `backend/nvms` directory containing `go.mod` with `replace
github.com/kooshapari/nanovms => ../../../phenotype-tooling/crates/nanovms` at line 25,
run `go mod tidy` or `go build ./...`.
3. The Go module resolution attempts to apply the `replace` directive for
`github.com/kooshapari/nanovms` and tries to read the module from
`../../../phenotype-tooling/crates/nanovms`, which is missing in this checkout.
4. The Go tooling reports an error similar to `stat
../../../phenotype-tooling/crates/nanovms: no such file or directory` and the
`backend/nvms` module fails to build in environments that only have the BytePort repo.(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** backend/nvms/go.mod
**Line:** 25:25
**Comment:**
*Api Mismatch: The `replace` points to a local relative path outside this repository, so fresh checkouts/CI runners that only clone BytePort will fail module resolution (`github.com/kooshapari/nanovms` cannot be found). Use a resolvable module source for shared builds (published version or vendored/submodule path available in CI), or gate the local replace to developer-only workflows.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix|
CodeAnt AI finished reviewing your PR. |



User description
Summary
Re-point BytePort's NVMS parser from local implementation to the shared
phenotype-tooling/nanovms/parserpackage as part of cross-repo consolidation (epic B).Context
BytePort contained a local NVMS configuration parser (
backend/nvms/) that duplicated parser logic. As part of epic B's cross-repo consolidation, this parser has been extracted intophenotype-tooling/crates/nanovms/parserso it can be shared across the phenotype ecosystem (BytePort, phenotype-sdk, etc.). This PR redirects BytePort's references to the external shared package.Changes
github.com/kooshapari/nanovms v0.0.0dependency withreplacedirective pointing to../../../phenotype-tooling/crates/nanovmsNVMS,Service, andBuildPackstruct definitions with type aliases pointing toparser.NVMS,parser.Service,parser.BuildPack— maintaining full backward compatibilityparseNVMSConfigimplementation with a thin delegation toparser.ParseNVMSConfigKey Implementation Details
=) rather than type definitions, so all existing usages ofmodels.NVMS,models.Service,models.BuildPackcontinue to compile without changesreplacedirective uses a relative path to the local clone so no remote publish is needed yet — the external package lives in the same monorepo-adjacent workspaceAWSConfig,AWSResource, etc.) remain local since they are BytePort-specificTesting
cd backend/nvms go mod tidy go build ./models go vet ./modelsThe
modelspackage builds and vets cleanly. TheprojectManagerpackage has a pre-existing build failure fromfermyon/spin-go-sdk(unrelatedexport commentmismatch) that exists onmainas well.Links
CodeAnt-AI Description
Use the shared NVMS parser for config loading
What Changed
Impact
✅ Consistent NVMS parsing across tools✅ Fewer parser mismatches✅ Easier NVMS parser updates💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.