v0.116.0: observability pass — always-on debug ring + leveled sweep + agent tab + self-log pull — MinAgent: 0.81.0
Capture layer: LogBuffer always exists; logger = MultiWriter(LevelFilterWriter (stdout, logging.level), ring) so DEBUG detail exists remotely without a config flip while docker logs keep respecting the level. New internal/logx leveled helpers. Report ACK gains controller_log_requested (additive); next report ships controller_log_tail (128KB, consume-once, app-tail wire byte-compatible). Debug page: Vezérlő|Ügynök tabs; agent tab proxies agent /debug/logs with the pre-0.83 notice on typed 404. Sweep: netstorage_job phases, netprobe, handler validation refusals + orphan WARN, SupportsWithSource gate line, agentapi per-call DEBUG, migrate phase lines, tier2/offbox unswallowed persists. Red-proofs: filter-disabled, drain-removed, dropped-phase-line all FAIL. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PSK5g6qYLknKj8u3QAFEr6
This commit is contained in:
@@ -394,7 +394,10 @@ func (m *Manager) RunOffboxBackup(ctx context.Context) error {
|
||||
t := m.settings.GetOffboxTarget()
|
||||
base, env := m.offboxBaseArgs(t)
|
||||
start := time.Now()
|
||||
_ = m.settings.UpdateOffboxStatus(func(o *settings.OffboxTarget) { o.LastStatus = "running"; o.LastError = "" })
|
||||
m.logger.Printf("[INFO] [offbox] backup run started (%d app(s) toggled)", len(apps))
|
||||
if err := m.settings.UpdateOffboxStatus(func(o *settings.OffboxTarget) { o.LastStatus = "running"; o.LastError = "" }); err != nil {
|
||||
m.logger.Printf("[WARN] [offbox] status persist (running) failed: %v", err)
|
||||
}
|
||||
|
||||
var backedUp int
|
||||
var missing []string
|
||||
@@ -424,7 +427,7 @@ func (m *Manager) RunOffboxBackup(ctx context.Context) error {
|
||||
if runErr == nil {
|
||||
snapshots = m.offboxRecordStats(ctx, base, env)
|
||||
}
|
||||
_ = m.settings.UpdateOffboxStatus(func(o *settings.OffboxTarget) {
|
||||
if perr := m.settings.UpdateOffboxStatus(func(o *settings.OffboxTarget) {
|
||||
o.LastRun = time.Now().UTC().Format(time.RFC3339)
|
||||
o.LastDuration = dur.Round(time.Second).String()
|
||||
if runErr != nil {
|
||||
@@ -446,7 +449,9 @@ func (m *Manager) RunOffboxBackup(ctx context.Context) error {
|
||||
}
|
||||
o.LastWarning = strings.Join(warns, " ")
|
||||
}
|
||||
})
|
||||
}); perr != nil {
|
||||
m.logger.Printf("[WARN] [offbox] status persist (final) failed: %v", perr)
|
||||
}
|
||||
if m.offboxNotify != nil {
|
||||
m.offboxNotify(dur, snapshots, runErr)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user