Skip to content

feat(inventory): find products by manual local barcode - #145

Open
efraespada wants to merge 14 commits into
developfrom
feature/91-find-household-products-by-manually-entered-barcode
Open

efraespada wants to merge 14 commits into
developfrom
feature/91-find-household-products-by-manually-entered-barcode

Conversation

@efraespada

@efraespada efraespada commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Inventory now finds a household product from manually entered GTIN-8, GTIN-12, GTIN-13 or GTIN-14 digits. It preserves leading zeroes, validates the printed shape and check digit, and uses one household-local canonical identity. A manager chooses an existing Pantry product, reviews its name and code, then separately confirms an association or removal. Removal matches the reviewed association ID, protecting later reassignment.

Unavailable reads retain the entered digits and offer retry. Confirmed changes and stale-removal refresh focus the current result. An unconfirmed write focuses original-request recovery and reuses the exact frozen request. Current grants and household isolation protect queries, writes and original receipts. The UI consumes the exact published @vypdev/ha-ui@0.1.0-next.3 numeric text field.

Closes #91.

Specification and coverage

The native companion retains SHA-256 9f30bb5b6b4ec3401b78b5f05943279870ce21bd0adb29e165d546a5090603a1 and all eight case identities. SQLite schema 35 adds the local association index. Representative schema 34, 30 and 20 data survive migration; failure rolls back source bytes, and compatible activation retains associations and original receipts.

Cases Executable evidence
C01 Four printed lengths, ASCII shape, GS1 check digits, leading zeroes and canonical equivalence
C02–C03 Current-household found/unlinked reads, local-only requests, current readers, management grants and protected original receipts
C04 Independent SQLite writers, one canonical-code winner and exact-association stale-removal protection
C05 Original replay, changed-payload conflict, late receipt rollback and committed-response loss followed by original recovery
C06 Schema 34/30/20 migration, atomic failure rollback and compatible checkpoint activation
C07 Ingress/standalone, EN keyboard, ES 390 px touch, light/dark, focus, selection, confirmation, conflicts and explicit retry
C08 Immutable Edge.55 packaging, both actual CPU image campaigns and separately installed Home Assistant acceptance
  • Complete backend: 5,583 tests pass with 100% statement and branch coverage globally and across all 231 authored modules. The independent source audit passes. The final package passes all eight installation contracts and normal wheel acceptance.
  • Frontend runtime is byte-identical to the accepted Edge.54 UI. Its 1,929 unit tests and independent audit qualify all four coverage metrics at 100% globally and per file. Pre-refinement CI passed all 121 source journeys, all 45 catalog cases and all 66 actual-image journeys on each architecture, without skipped, unexpected or flaky results.
  • The refined barcode journeys also pass in both compositions with unbroken 160-character names. Strict runtime/catalog types, documentation links and all 15 exact-release Action locks pass. Final same-head CI repeats the complete applicable gates.

The qualification document retains fixture-ordering and transport diagnostics. One earlier standalone recovery trace was overwritten by an unintended follow-on run; its original failure log/result remain retained, and subsequent isolated and complete campaigns passed. This limitation is separate from the current original long-name screenshots and layout measurements.

CI diagnostics and final fixture preparation

The initial Edge.55 package campaign passed both 66-case image suites, but its source frontend campaign passed 119 cases and failed two time bounds. The progress test now requires its original creation POST to return HTTP 200 within the existing 15-second HTTP bound before checking its projection. The long workspace journey has a 120-second case budget; the complete suite retains its 900-second limit, zero retries and all original assertions. The complete local campaign at 4556aa1 passed 121 cases in 375.342132 seconds.

The subsequent CI at 4556aa1 passed all eight other product jobs, including 5,583 backend tests in 1,303.53 seconds with its independent coverage audit, and 1,929 frontend unit tests at 100% in all four metrics globally and per file. Its amd64 and ARM64 jobs each passed all 66 actual-image journeys with zero skipped, unexpected or flaky results and successful fixture cleanup. Artifact SHA-256/CRC checks and eight original barcode screenshots per architecture are retained. amd64 executes through emulation on the self-hosted ARM64 host; this does not claim physical x64 hardware.

That source frontend campaign passed 120 cases and failed one Overview-to-Tasks navigation after two authorization reads returned HTTP 503 storage_busy. The root correctly displayed its unavailable state. The original log, report, trace, response bodies and screenshot remain retained. An unchanged isolated standalone repeat passed in 51.7 seconds. The trace establishes storage contention without independently identifying its writer.

The final preparation change waits for the real Points consumer to process the completed and approved work created by the calendar fixture, while requiring its production worker to remain running. The journey also waits for the owning household's access reconciliation; the first successful task-detail response is not treated as completion of that larger operation. No consumer is faked or paused, and every task state, permission check, normal unavailable-state behavior and existing assertion remains.

Both affected complete workspace journeys pass after this change in 106.436065 seconds, with zero retries, skipped, unexpected or flaky results. Ruff, formatting and documentation links pass. The three changed files are the fixture, its browser journey and this qualification document. All 231 authored Python modules and frontend runtime sources remain identical to the pinned Edge.55 runtime. Its four UI files, source archive, wheel, package pins and installed acceptance remain unchanged. The current CI repeats the full source, catalog and both actual-image campaigns for the final commit.

Copilot #995 records the earlier shared-pool occupancy as an operational delay. Capacity has recovered: the Linux jobs are serving this new commit and its Branch Sync has passed. The previously proposed older Copilot run was cancelled externally and no further cancellation is needed. Product CI has not been bypassed.

Review resolution

The shared HTTP barcode annotation and both generated OpenAPI snapshots now restrict the printed shape to exactly 8, 12, 13 or 14 ASCII digits. The regression reproduced six advertised-shape mismatches for lengths 9–11 across both deployments. All 30 focused HTTP and composed-snapshot cases pass after correction. Resolved contract review

The wrapping report was a verified false positive: the published ha-ui card already supplies inherited overflow-wrap:anywhere. In both compiled deployment journeys, the 160-character review and result each measure clientWidth=324 and scrollWidth=324 within a 390 px viewport. No Domus CSS change was necessary. The first diagnostic passed its layout assertions but used an incorrect new light-text expectation; that test expectation now matches the existing #172b3a, without changing app colors. Measured justification

Immutable Edge.55

  • Runtime source: e8e93fe892babc0263808848c3bd24c8aea9d2c2.
  • Source archive SHA-256: eca392d17f93d6eb25006b78a5690f25680b09f8c625feb0ec8093dbb7bbc4a5.
  • Normal and independently measured Linux wheel SHA-256: 35262f4448e6ddeee76882e6096b5f8fb666a1cbd043bdce1068f24574d284fb.
  • Local ARM64 image: sha256:e0cb412274443805bef5b8f72150c8c4c9c2d0b1b3c1399f31eebb5cfe081fb0.

All 231 Python modules match Git/archive, wheel, installed Linux builder and final image. All four UI files match their accepted Edge.54 bytes. Only the HTTP annotation changes between those runtime sources. Schema 35 is retained, with no additional breaking boundary. Local image measurements do not assert the Supervisor image has the same Docker ID.

Installed Edge.52/53 exposed query and confirmed-write focus loss; Edge.54 passed the corrected installed journey. That qualification included EN keyboard, real Tab continuation, cancelled review, successful writes, two-tab stale removal, Chrome touch emulation at 390 x 844 in Spanish, light/dark, offline retry and native cold stop/start persistence. A withheld successful POST response recovered after reload through the exact original GET receipt without another POST. The original key was req_7baed4b8cefbd84cf1e94c3e4f84fbfb, operation domus_NqAtnL4ysG5lG2-yvMnB8biNDhRoP_NX.

The same synthetic installation 22f5e6a0_domus_edge updated from 54 to 55 through the native HA dialog with backup creation unchecked. Fresh native Info confirmed version 55 before the installed acceptance. The actual native OpenAPI document now advertises exactly 8/12/13/14 digits for lookup, link and removal. A successful link response was explicitly reset after HTTP 200; reload and original recovery made three successful GETs and zero new POSTs, retaining key req_c9ed80e95782ad442b60d5c48467aadf and operation domus_JhzsBOu64mH266GrohkQH7swgDoauWTJ. Open product stock focuses movement history. Spanish Chrome touch emulation at 390 x 844 verifies the 160-character name in result and removal review in light and dark; cancellation preserves the original eight digits and focuses the field. A native cold stop/start preserves all three synthetic products and both associations, including the pre-existing Tea code. Final native Info confirms version 55 stopped. Permanent synthetic installation cleanup is tracked separately and awaits a current scoped confirmation after final CI/review.

Final head is 52ab6e15e05f25ef6893f610f0e29cda3203b1a0. Current CI is executing on self-hosted runners and Branch Sync has passed. Installed Edge.55 acceptance has passed; final checks and applicable review for this same commit remain required before merge. Qualification and candidate identities

@docs-page

docs-page Bot commented Nov 19, 2026

Copy link
Copy Markdown

To preview the documentation for this pull request, visit the following URL:

docs.page/vypdev/domus~145

Documentation is deployed and generated using docs.page

@vypbot vypbot added the state:ai-processing A Copilot agent is analyzing or working on the issue or change. label Nov 19, 2026
@vypbot
vypbot self-requested a review November 19, 2026 15:57
@vypbot vypbot added this to vypdev Nov 19, 2026
@vypbot vypbot moved this to In Progress in vypdev Nov 19, 2026
@vypbot
vypbot changed the base branch from develop to master November 19, 2026 15:58
@efraespada efraespada linked an issue Nov 19, 2026 that may be closed by this pull request
1 task done
@vypbot
vypbot changed the base branch from master to develop November 19, 2026 15:58
@vypbot vypbot added size: XXL Label to indicate a task of size XXL state:reviewing A pull request is being reviewed. and removed state:ai-processing A Copilot agent is analyzing or working on the issue or change. labels Nov 19, 2026
@vypbot vypbot added state:ai-processing A Copilot agent is analyzing or working on the issue or change. and removed state:ai-processing A Copilot agent is analyzing or working on the issue or change. labels Nov 19, 2026
@vypbot vypbot added state:ai-processing A Copilot agent is analyzing or working on the issue or change. 85% Progress: 85% and removed state:ai-processing A Copilot agent is analyzing or working on the issue or change. labels Nov 19, 2026
@vypbot vypbot added state:ai-processing A Copilot agent is analyzing or working on the issue or change. and removed state:ai-processing A Copilot agent is analyzing or working on the issue or change. labels Nov 19, 2026
@vypbot vypbot added state:ai-processing A Copilot agent is analyzing or working on the issue or change. 80% Progress: 80% and removed state:ai-processing A Copilot agent is analyzing or working on the issue or change. 85% Progress: 85% labels Nov 19, 2026
@vypbot vypbot added the state:ai-processing A Copilot agent is analyzing or working on the issue or change. label Nov 19, 2026

@vypbot vypbot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current status: All findings originating in this review are resolved.
Last reconciled on 4556aa1. See aggregate Bugbot status.

🤖 Bugbot review snapshot

Bugbot reported 2 potential problems when commit bd3e626 was analyzed. This snapshot is historical; use the status block above for current state. 2 findings are linked to changed code.

Findings

  • low: OpenAPI permits unsupported GTIN lengths — docs/contracts/native-household-api.openapi.json:3947
  • low: Wrap long product names in barcode results and review — frontend/src/presentation/domus-inventory.ts:107

@vypbot

vypbot commented Nov 19, 2026 •

Copy link
Copy Markdown

Bugbot: review complete

Current status: No active findings on 4556aa1.

Pull request · Verified commit · Workflow run

@vypbot vypbot added state:changes-requested Review identified changes that are required. state:awaiting-issue-author The next action requires more information or changes from the issue author. and removed state:reviewing A pull request is being reviewed. state:ai-processing A Copilot agent is analyzing or working on the issue or change. labels Nov 19, 2026
@efraespada
efraespada marked this pull request as draft November 19, 2026 19:27
@vypbot vypbot added state:ai-processing A Copilot agent is analyzing or working on the issue or change. state:reviewing A pull request is being reviewed. 80% Progress: 80% and removed state:changes-requested Review identified changes that are required. state:awaiting-issue-author The next action requires more information or changes from the issue author. state:ai-processing A Copilot agent is analyzing or working on the issue or change. 85% Progress: 85% labels Nov 19, 2026
@efraespada
efraespada marked this pull request as ready for review November 19, 2026 20:38
@vypbot vypbot added 90% Progress: 90% and removed 80% Progress: 80% labels Nov 19, 2026
@vypbot vypbot added state:ai-processing A Copilot agent is analyzing or working on the issue or change. state:ready The change is ready for human approval or merge. state:awaiting-maintainer The next action requires a maintainer response or approval. and removed state:reviewing A pull request is being reviewed. state:ai-processing A Copilot agent is analyzing or working on the issue or change. labels Nov 19, 2026
@vypbot vypbot added the state:ai-processing A Copilot agent is analyzing or working on the issue or change. label Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

90% Progress: 90% size: XXL Label to indicate a task of size XXL state:ai-processing A Copilot agent is analyzing or working on the issue or change. state:awaiting-maintainer The next action requires a maintainer response or approval. state:ready The change is ready for human approval or merge.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

✨🧑‍💻 - Find household products by manually entered barcode

2 participants