feat(platform): harden telemetry pipeline and unify Semi UI workspaces

This commit is contained in:
lingniu
2026-07-18 00:26:36 +08:00
parent 65b4e4f055
commit 159c80b0ae
136 changed files with 21616 additions and 1785 deletions

View File

@@ -0,0 +1,23 @@
package platform
import "sync"
// schemaReadyGate serializes schema probes and caches only a successful result.
// Request cancellation and transient database failures must remain retryable.
type schemaReadyGate struct {
mu sync.Mutex
ready bool
}
func (gate *schemaReadyGate) ensure(check func() error) error {
gate.mu.Lock()
defer gate.mu.Unlock()
if gate.ready {
return nil
}
if err := check(); err != nil {
return err
}
gate.ready = true
return nil
}