Skip to content

docs: verify self_driving_miles_since_reset minimum_delta claim (no change) - #35

Closed
Bre77 wants to merge 1 commit into
mainfrom
fm/pts-selfdriving-mindelta
Closed

docs: verify self_driving_miles_since_reset minimum_delta claim (no change)#35
Bre77 wants to merge 1 commit into
mainfrom
fm/pts-selfdriving-mindelta

Conversation

@Bre77

Copy link
Copy Markdown
Member

An automated HA-domain review claimed self_driving_miles_since_reset never receives data unless its field config carries minimum_delta >= 1, by precedent with odometer. Verified before touching anything.

This library's field config surface (add_field/update_config/patch_config) only ever sends {"interval_seconds": ...} — there is no minimum_delta key anywhere in the code, and no per-field precedent (odometer included) that differs from any other signal. The claim doesn't describe anything this library controls, so there's nothing to fix here without inventing a new, unverified config surface.

Evidence and reasoning: data/pts-selfdriving-mindelta/report-note.md.

No functional change — documentation of the investigation only.

@Bre77

Copy link
Copy Markdown
MemberAuthor

Verification note captured in fleet records - the investigation doc doesn't need to live in the repo. Verdict stands: minimum_delta is not a config surface of this library; follow-up moved to the api's field configuration.

@Bre77Bre77 closed this Aug 12, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

self.fields=response.get("fields", {})
self._populated=True

P2 Badge Guard REST config writes against newer SSE events

When _ensure_populated() starts a config GET and a newer config SSE event is processed before that GET completes, this unconditional assignment can overwrite the event's fresh fields with the older REST response. The waiting add_field() then evaluates its no-op check against stale data; for example, an SSE event can report that a requested field was removed, only for an older GET showing it present to complete afterward and cause the PATCH to be skipped, leaving telemetry disabled. Version or otherwise discard a fetch when a config event has arrived since it began.

AGENTS.md reference: AGENTS.md:L19-L19


def_on_connection_event(self, connected: bool) ->None:
"""Unpopulate on disconnect - see the __init__ registration comment."""
ifnotconnected:
self._populated=False

P2 Badge Invalidate offline-populated config when connecting

If get_config() succeeds while the stream is already disconnected, _populated becomes true without any subsequent disconnect notification, and this handler leaves it true when the stream connects. If another client changes the configuration before that connection, a connection listener that reasserts fields before the SSE snapshot will trust the stale record and may incorrectly skip its PATCH; the later snapshot updates the cache but never retries the stranded request. Clear records learned while offline at connection start, or track the connection epoch associated with population.

AGENTS.md reference: AGENTS.md:L21-L21

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for freeto 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.

1 participant

@Bre77