Repository navigation
Conversation
Signed-off-by: Segran <goran@andersson-stehag.se>
Signed-off-by: Segran <goran@andersson-stehag.se>
Signed-off-by: Segran <goran@andersson-stehag.se>
Signed-off-by: Segran <goran@andersson-stehag.se>
segran2
marked this pull request as ready for review
November 12, 2026 16:20
This branch has not been deployed
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.
Portal datasets may contain multiple points for the same field or different SoC candidates. index_points previously kept the last row per key/name and lookup chose the greatest row number, allowing an older measurement to hide a newer one.
Both stages now compare parsed measurement timestamps, including timezone offsets and fractional seconds. Valid timestamps outrank missing or invalid ones; equal or unavailable timestamps retain row-order fallback. Bumps vag_vehicle to 0.3.1 and refreshes generated metadata.
Adds diagnostics once per newly downloaded dataset: VIN-masked filename, portal fetch time, candidate count, selected row and selection reason. Logs up to 32 SoC candidate rows (including those discarded by indexing), with key/name, value, timestamp and selection flag; excess rows are counted. No raw datasets or credentials are logged. This distinguishes stale upstream measurements from incorrect local selection.
Validation:
Synthetic regression harness covers duplicate keys/shared names, candidate GUIDs, both row orders, missing/invalid/equal timestamps, offsets, fractional seconds, empty values and nil inputs. Original 0.3.0 fails the newest-first case.
Diagnostic tests cover discarded candidates, selection reasons, no candidates, truncation and VIN masking.
make test-driver ID=vag_vehicle: 40 passed, 16 skipped.
make check: 5091 passed, 951 skipped on the branch updated against main; manifests, generated metadata, source history, host API and sandbox checks passed.
Updated code installed locally on FTW Core v0.159.0-beta.1+local.3 with an Audi e-tron: restart/authentication/download succeeded; actual dataset diagnostics showed one SoC candidate with an old measurement timestamp and correctly masked VIN. Firmware was not recorded. Competing SoC candidates in a single dataset are covered by the regression harness.
Live follow-up on 12 November 2026: two separate portal datasets were fetched at 17:04 and 17:14 CET. Each contained one candidate at 80%, with the same measurement timestamp of 11 November 2026 at 05:31:06 UTC. The driver selected that observation by timestamp and logged the fetch and measurement times separately. This confirms that a newly delivered file can contain an old measurement. These runs do not exercise competing candidates in the same real dataset.
No credentials, VINs or raw site datasets are included. This does not refresh stale upstream data. After merge, FTW must advance its bundled-driver source pin and regenerate its recovery snapshot to reach bundled installations.
Fixes #188.