Skip to content

fix(cli): complete version protocol follow-ups#45

Open
tkkhq wants to merge 1 commit into
mainfrom
fix/pr39-review-followups
Open

fix(cli): complete version protocol follow-ups#45
tkkhq wants to merge 1 commit into
mainfrom
fix/pr39-review-followups

Conversation

@tkkhq

@tkkhq tkkhq commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #39 that completes the CLI-side version-protocol fixes:

  • Report a neutral dev request version for source, dirty, and detached-revision builds while preserving the full build identifier in User-Agent and preserving release/nightly version forms.
  • Render API instruction notices as soon as a log stream is established, before --follow blocks; consume the one-shot instruction so it is not printed again when command execution returns.
  • Make the CLI wire-contract comment self-contained rather than referring to unavailable implementation details.
  • Add coverage for stream request/response handling, no-latest deprecation notices, source-build version reporting, an actual /auth/* device-flow login, and sticky global-state cleanup.

Audience

  • End users: notices remain visible for long-running log-follow sessions, and locally built binaries report an unambiguous development version.
  • Contributors and self-builders: protocol behavior is covered through hermetic httptest cases, including source-build and login flows.

Test

  • go build ./...
  • go test ./... -count=1
  • go test -race ./internal/api ./internal/cmd/upgrade ./internal/cmd/functions ./internal/cmd/frontends ./cmd/volcano -count=1

@tkkhq tkkhq requested a review from a team as a code owner July 10, 2026 15:25
Copilot AI review requested due to automatic review settings July 10, 2026 15:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Completes CLI-side version protocol handling for development builds and long-running log streams.

Changes:

  • Reports source builds as dev while preserving diagnostic User-Agent data.
  • Displays and consumes API notices when log streams open.
  • Expands protocol, login, stream, and state-cleanup tests.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/logfollow/follow.go Adds stream-open callbacks.
internal/cmd/upgrade/upgrade.go Consumes one-shot notices.
internal/cmd/upgrade/upgrade_test.go Tests deprecation and cleanup.
internal/cmd/functions/logs.go Prints notices before following logs.
internal/cmd/functions/logs_test.go Tests runtime-follow notices.
internal/cmd/frontends/logs.go Prints notices before following logs.
internal/cmd/frontends/logs_test.go Tests runtime-follow notices.
internal/api/version_protocol.go Adds consumption and development-version reporting.
internal/api/version_protocol_test.go Tests version classification and consumption.
internal/api/log_stream_test.go Tests stream protocol headers.
cmd/volcano/main_test.go Expands end-to-end notice and login coverage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +81 to +82
lastInstructions.CLIInstruction = ""
lastInstructions.LatestVersion = ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants