Skip to content

Close remaining indication ownership and final validation gaps - #39

Merged
Chreece merged 1 commit into
indicationsfrom
fix/indication-ownership-round2-20261106
Nov 6, 2026
Merged

Chreece merged 1 commit into
indicationsfrom
fix/indication-ownership-round2-20261106

Conversation

@Chreece

@Chreece Chreece commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Why

The first audit left two ownership-filter consistency gaps: display/FIFO fallback could supply unverified ownership, and a transaction during analysis could make the initial membership snapshot stale.

This round also reproduced two defects in the shipped contribution path:

  • Preference persistence happened after the core's final validation, so a currency change or source-evidence expiry during that write could leave a returned plan outdated.
  • Full AI rounded whole-unit principal before a second discrete check, losing affordable units at fractional-cent prices.

Changes

  • Build bounded ownership snapshots from the existing strict transaction-quantity validator, with explicit owned / not-owned / unknown results.
  • Preserve unresolved shared ticker aliases as candidate-specific uncertainty and reject malformed ledger evidence without substituting display aggregates.
  • Recheck selected candidate ownership at completion; invalidate relevant purchases/sold-out portfolio-source candidates while allowing unrelated transactions and the selected allow-owned policy.
  • Persist visible preferences before the last account read, then reuse the original raw-source freshness and final purchase checks. No asynchronous work follows that checked snapshot.
  • Preserve explicitly malformed transaction types, dates, collections, quantities and identity currency values through storage normalization. Keep legitimate pre-ledger migration, repeated-read/restart stability and existing migrated records.
  • Keep Full AI whole-unit principal inside the raw deterministic/requested ceilings using exact sizing; cash rounding, fees, reserves and final risk gates remain in force.
  • Explain uncertain portfolio/search exclusions in all supported UI languages; preserve unknown ownership metadata instead of a false not-owned badge.
  • Fix progress callback error handling and refresh panel revision to 0.4.0-r75.

V13 predictive formulas, weights, thresholds and selected risk targets remain unchanged. Existing holdings stay outside new-contribution risk. No failed request automatically repeats a paid AI review.

Validation

  • 2,519 tests passed, including 262 new cases this round.
  • Production-path cases cover all three analysis modes, provider/AI/preference delays, relevant and unrelated transactions, account currency changes, expired evidence, unavailable final reads, concurrent profiles and Full AI precision.
  • Real storage tests cover malformed records and actual load/save/read/restart migration behavior.
  • Behavioral DOM tests cover readable ownership exclusions, with the full privacy suite retained.
  • Python compilation, JavaScript syntax and whitespace checks passed.
  • Published Git tree matches the locally tested tree exactly.

Verification limits

No live Home Assistant installation or full browser rendering is claimed. Legacy migrated positions remain inherited user-provided records rather than independent broker confirmation. Prospective validation is still required before promoting predictive-model changes.

The existing audit document records the follow-up findings and closes its previous ownership limitations.

Verify owned-instrument filtering from strict local transaction evidence and recheck selected candidates at completion. Move preference persistence before the final account, source and purchase validation. Preserve malformed storage evidence and legacy compatibility. Retain raw whole-unit principal through Full AI ceilings without changing predictive parameters.

Validated locally with 2519 tests, Python compilation, JavaScript syntax and whitespace checks.
@Chreece
Chreece merged commit 99c0e36 into indications Nov 6, 2026
6 checks passed
Sign up for free to 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