Skip to content

port: self-update and metrics-gating#2

Merged
syednexgen merged 6 commits into
mainfrom
port/missing-subsystems
Jul 3, 2026
Merged

port: self-update and metrics-gating#2
syednexgen merged 6 commits into
mainfrom
port/missing-subsystems

Conversation

@sheyabernstein

Copy link
Copy Markdown
Collaborator

Port missing agent subsystems:

  • internal/update: self-update manager with digest verification and smoke-test
  • metrics enable/disable gating
  • diagnostic commands (version, diagnose status)
  • corresponding tests

@sheyabernstein sheyabernstein added bug Something isn't working enhancement New feature or request labels Jul 2, 2026
@sheyabernstein sheyabernstein self-assigned this Jul 2, 2026
@sheyabernstein
sheyabernstein requested a review from syednexgen July 2, 2026 10:15

@syednexgen syednexgen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

left a few notes, mostly around self-update safety and rollout behavior.

@syednexgen syednexgen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

a few more

Comment thread internal/update/manager.go Outdated
Comment thread internal/update/manager.go
Comment thread internal/update/manager.go Outdated
Comment thread internal/update/manager.go Outdated
Comment thread cmd/agent/main.go Outdated
Comment thread internal/client/hub.go Outdated
Comment thread internal/client/hub.go
Comment thread internal/update/manager.go
- TOCTOU: use os.CreateTemp for temp binary to prevent symlink replacement
- data-loss: restore from backup on cross-device copy failure in atomicSwap
- metrics: MetricsEnabled *bool with nil=enabled; collectors default enabled
- refactor hub client 401-retry pattern into doWithKeyRefresh helper
- verify digest and resolve symlinks before exec; skip non-semver silently

@syednexgen syednexgen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

one remaining thing from my side.

Comment thread internal/update/manager.go

@syednexgen syednexgen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good to me.

@syednexgen
syednexgen merged commit a15613d into main Jul 3, 2026
8 checks passed
@syednexgen
syednexgen deleted the port/missing-subsystems branch July 3, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants