Mirror/sync manager inject observability hooks#217
Merged
Conversation
## Summary - derive status fields from existing daemon-backed runtime and health summaries instead of reading the boot snapshot directly for those same values - keep provider list behavior unchanged - add focused status-test assertions to pin the summary-derived field relationships ## Why This tightens the Mirror-native status seam by reducing mixed truth sources and leaning on daemon-backed summaries already in use. ## Scope Changed: - src/mirror/status/status.ts - src/mirror/status/tests/status.test.ts Not changed: - src/mirror-service/mirror_service.ts - src/mirrordaemon/runtime_state.ts - src/mirror-sync/* - adapter-boundary files - compat runtime files - status formatting - provider list behavior ## Details This patch: - derives service.lore_dir from health.service.lore_dir - derives service.provider_url from health.service.provider_url - derives service.operator_auth_configured from health.service.operator_auth_configured - derives service.workspace_users_root from runtime.readiness.workspace.users_root - derives lore.ready / lore.discovered_files from runtime.readiness.lore - derives lore.dir from health.service.lore_dir - derives workspace.ready / workspace.users_root from runtime.readiness.workspace - derives sync.node_id from runtime.node_id ## Verification - pnpm vitest run src/mirror/status/tests/status.test.ts Co-authored-by: Agent 0 <agent0@toadaid>
## Summary - derive status.provider.providers from the daemon-backed provider summary instead of reading runtimeHost.providerPlane.listProviders() directly - extend the daemon provider summary to carry url and last_error - add focused daemon provider-summary coverage for the new fields ## Why This finishes the remaining provider truth gap in the status seam by making the status provider list come from the same daemon-backed summary path as the other provider aggregate fields. ## Scope Changed: - src/mirrordaemon/daemon_types.ts - src/mirrordaemon/runtime_state.ts - src/mirrordaemon/runtime_state.test.ts - src/mirror/status/status.ts Not changed: - src/mirror-service/* - src/mirror-sync/* - adapter-boundary files - compat runtime files - status formatting - the excluded #130 / #133 seams ## Details This patch: - adds url and last_error to MirrordaemonProvidersSummary.providers[] - populates those fields in buildProvidersSummary(...) - changes status.ts to source: - provider.active_provider_id - provider.total - provider.available - provider.fallback_available - provider.providers from getMirrordaemonProvidersState(...) instead of mixing in direct providerPlane.listProviders() reads ## Verification - pnpm vitest run src/mirrordaemon/runtime_state.test.ts - pnpm vitest run src/mirror/status/tests/status.test.ts --------- Co-authored-by: Agent 0 <agent0@toadaid>
Description: - derive websocket hello envelope truth from daemon runtime summary - source node_id and runtime_started_at from getMirrordaemonRuntimeState(...) - preserve hello envelope shape, backlog replay, and live event flow - keep scope limited to runtime_events_ws only - no routing, sync, compat, daemon-internal, or protocol-shape changes After merge, run this on home dev: Co-authored-by: Agent 0 <agent0@toadaid>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title:
sync: inject observability hooks through sync manager
Description: