Skip to content

Conversation

@stainless-app
Copy link
Contributor

@stainless-app stainless-app bot commented Dec 11, 2025

Automated Release PR

0.7.0 (2025-12-23)

Full Changelog: v0.6.1...v0.7.0

Features

  • add cp command for file copy to/from instances (#18) (f67ad7b)

Chores

  • internal: codegen related update (a6c6588)

This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions


Note

Release 0.7.0

  • Adds cp command for file copy to/from instances
  • Introduces pkg/jsonflag framework (with tests) to mutate request body, query, and header via CLI flags; includes date/datetime parsing helpers
  • Adds pkg/cmd/util.go helpers: fileReader, stdin JSON merging with flags, and HTTP debug middleware
  • Updates version to 0.7.0, refreshes CHANGELOG.md, and adds direct github.com/tidwall/sjson dependency

Written by Cursor Bugbot for commit cc35fa1. This will update automatically on new commits. Configure here.

@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch 5 times, most recently from 628234a to 8e438e1 Compare December 13, 2025 20:39
for _, key := range keys {
if key == "#" {
key = strconv.Itoa(len(gjson.GetBytes(json, path).Array()) - 1)
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Empty array causes negative index in path resolution

When the path contains # (representing the last array element) and the target array is empty, len(gjson.GetBytes(json, path).Array()) - 1 evaluates to -1. This produces an invalid path like items.-1 which will cause unexpected behavior when passed to sjson.SetBytes.

Fix in Cursor Fix in Web

parsed = any(timeVal).(T)
case any:
// For `any`, store the string value directly
parsed = any(val).(T)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Type switch unreachable for any type parameter

The case any: branch in the type switch is unreachable. When T is instantiated with any, the zero value of parsed is nil, and a type switch on nil doesn't match case any:. This causes JSONAnyFlag to always fall through to default: and return "unsupported type for JSON flag" error, making the type unusable.

Fix in Cursor Fix in Web

}
// For any flags with SetValue, register the configured value
globalRegistry.Mutate(v.config.Kind, v.config.Path, v.config.SetValue)
*v.destination = any(v.config.SetValue).(T)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Unchecked type assertion may panic at runtime

The type assertion any(v.config.SetValue).(T) will panic at runtime if SetValue is not exactly of type T. For instance, if a JSONIntFlag is configured with SetValue of type int64 instead of int, the assertion fails and causes a panic. A type-safe check or conversion is needed.

Fix in Cursor Fix in Web

return base64.StdEncoding.EncodeToString(buf.Bytes())
}
return buf.String()
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Reader consumed on first access returns empty thereafter

The fileReader.String() method calls buf.ReadFrom(f.Value) which fully consumes the underlying io.Reader. Since Get() delegates to String(), any subsequent call to either method returns an empty string. CLI frameworks often access flag values multiple times (for help text, validation, actual usage), causing silent data loss after the first read.

Fix in Cursor Fix in Web

@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 8e438e1 to d3759e2 Compare December 23, 2025 19:28
@stainless-app stainless-app bot changed the title release: 0.6.2 release: 0.7.0 Dec 23, 2025
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from d3759e2 to cc35fa1 Compare December 23, 2025 19:28
@rgarcia rgarcia merged commit 1a1d84b into main Dec 23, 2025
4 checks passed
@stainless-app
Copy link
Contributor Author

stainless-app bot commented Dec 23, 2025

🤖 Release is at https://github.com/onkernel/hypeman-cli/releases/tag/v0.7.0 🌻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants