Add Go M0 validation scripts#46
Conversation
Zero automated PR reviewVerdict: No blockers found Blockers
Validation
ScopeHead: This deterministic review checks validation status and basic diff hygiene. A human reviewer still owns product judgment and design quality. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
WalkthroughThis PR adds npm scripts to run Go tests/build/smoke via Bun, implements a TypeScript smoke test that validates the built Go CLI's exit code and version output, updates CI and README to use the Bun-run Go commands and document the Go layout, and extends foundation tests to verify the wiring. ChangesGo workflow scripting and smoke test infrastructure
Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant Bun
participant SmokeScript as scripts/smoke-go.ts
participant GoBinary as cmd/zero
GitHubActions->>Bun: bun run build:go
Bun->>GoBinary: go build ./cmd/zero (produce binary)
GitHubActions->>Bun: bun run smoke:go
Bun->>SmokeScript: invoke scripts/smoke-go.ts
SmokeScript->>GoBinary: ./cmd/zero --version
GoBinary-->>SmokeScript: stdout "zero <version>" / exit code
SmokeScript->>SmokeScript: read package.json version and compare
SmokeScript-->>Bun: exit success/failure
Bun-->>GitHubActions: return job status
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/smoke-go.ts`:
- Around line 30-36: After parsing packageText into JSON, validate that the
extracted version field is a string before assigning to expectedVersion: check
that parsedPackage?.version is of type string (e.g., typeof
parsedPackage.version === "string"); if not, log a clear error like "Invalid
package.json: version is not a string" (include the actual value for debugging)
and call process.exit(1). Update the try block that currently assigns
expectedVersion = JSON.parse(packageText).version to first parse into a variable
(e.g., parsedPackage), perform the string type check, and only set
expectedVersion when the check passes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 73f9de4f-422f-44ab-a788-742b737f01b6
📒 Files selected for processing (6)
.github/workflows/ci.ymlREADME.mddocs/NPM_WRAPPER_SMOKE.mdpackage.jsonscripts/smoke-go.tstests/foundation-tools.test.ts
|
Blockers
Non-Blocking
Looks Good
|
Vasanthdev2004
left a comment
There was a problem hiding this comment.
Requesting changes because the PR touches README for Go M0 validation but leaves the public README presenting the old Bun/TypeScript/Ink architecture as current, conflicting with the new Go-native PRD. Full validation details are in my review comment.
|
Blockers Non-Blocking
Looks Good
|
Vasanthdev2004
left a comment
There was a problem hiding this comment.
Approved current head a2c3bb9 after verifying the README now aligns with the Go-native migration and validation/CI are passing.
Summary
Testing
Notes
bun run testhad 5 pre-existing failures in headless-exec/MCP before this branch; this PR does not touch those areas.Summary by CodeRabbit
Documentation
Chores
Tests