Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ jobs:
runs-on:
group: vypdev
labels: [self-hosted, codex, Linux]
timeout-minutes: 15
timeout-minutes: 25
env:
CI: "1"
steps:
Expand Down Expand Up @@ -401,11 +401,11 @@ jobs:
run: >-
lockf -k -t 600 /tmp/domus-ci-entry-browser.lock pnpm --filter @domus/frontend exec playwright test
-c playwright.entry.config.ts tests/e2e/administration.spec.ts tests/e2e/tasks.spec.ts tests/e2e/workspace-navigation.spec.ts
- name: Require all fifty-six actual-image household journeys
- name: Require all sixty actual-image household journeys
run: >-
uv run python -c "import json; from pathlib import Path;
result=json.loads(Path('frontend/test-results/entry-results.json').read_text());
assert result['stats']['expected']==56 and result['stats']['unexpected']==0
assert result['stats']['expected']==60 and result['stats']['unexpected']==0
and result['stats']['skipped']==0 and result['stats']['flaky']==0"

- name: Retain actual-image browser evidence
Expand Down
11 changes: 11 additions & 0 deletions addon-edge/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 0.0.0-edge.49

- Enable assignment saving after the selected household members change.
- Explain unchanged selections and retain the guard when the same members are selected in a different order.

## 0.0.0-edge.48

- Assign, replace and release planned task assignees through the Tasks workspace.
- Retain selected household members while reviewing a competing update or correcting unavailable choices.
- Recover the original recorded assignment after an interrupted response.

## 0.0.0-edge.47

- Complete explicit runtime cleanup when SIGTERM requests a stop.
Expand Down
8 changes: 7 additions & 1 deletion addon-edge/DOCS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Installation and operation

Edge 0.0.0-edge.47 packages the immutable runtime declared in
Edge 0.0.0-edge.49 packages the immutable runtime declared in
[artifact.json](artifact.json). Overview shows the signed-in member's completed tasks and
posted earned points for the current Family week. Open Family for the full report.
In Household settings, authorized members can preview a manual task proposal and
Expand All @@ -25,6 +25,12 @@ for outstanding items and quantities. The
the titles and current states of all open household occurrences. These projections share the
private app port `8100` and each requires its own installation grant.

In Tasks, authorized managers can use **Change assignment** to choose active
household members and **Save assignment** to confirm a changed selection. The editor
explains when the chosen members already match the current assignment. Clearing it
prepares a state-permitted release. A competing update retains the draft for
explicit review. **Check saved request** recovers an interrupted assignment.

Edge.47 completes explicit runtime cleanup when Home Assistant requests Stop.
Workers finish before identity disposal and installation-lease release. Standalone
shutdown reports its bounded delegated-grant cleanup result in the server log.
Expand Down
8 changes: 4 additions & 4 deletions addon-edge/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# The Supervisor builds this folder. Fetch only the reviewed immutable runtime and UI.
FROM ghcr.io/astral-sh/uv:0.11.29@sha256:eb2843a1e56fd9e30c7276ce1a52cba86e64c7b385f5e3279a0e08e02dd058fc AS uv
FROM python:3.14.6-slim-trixie@sha256:7bec7ddcddeff7975d6ba9b4be7dd6f6b2f55e7491539145e2978f7f97ce9144 AS source
ARG DOMUS_SOURCE_COMMIT=6e35e7e97926753adea78e40b9669f4fd2a01d54
ARG DOMUS_SOURCE_SHA256=d1bfb1c259bcf87c3531da91ed7faebf75272c66f24ec69c05ab357f5bbd88dc
ARG DOMUS_SOURCE_COMMIT=0a95702a5f53911cc12c645bf7f6f2e8dcd626cd
ARG DOMUS_SOURCE_SHA256=0fcb5041bdb95712545b0deb6aec3ed2d8f545289cd034537f0d70ae78a71989
ADD https://codeload.github.com/vypdev/domus/tar.gz/${DOMUS_SOURCE_COMMIT} /tmp/source.tar.gz
RUN printf '%s /tmp/source.tar.gz\n' "$DOMUS_SOURCE_SHA256" | sha256sum --check - \
&& mkdir /app \
Expand All @@ -24,9 +24,9 @@ RUN uv sync --frozen --no-dev --package domus-server --no-editable
RUN .venv/bin/python -c "from pathlib import Path; import domus; from domus.entrypoints.ui_bundle import load_bundle; assert load_bundle(Path(domus.__file__).parent / 'ui') is not None"

FROM python:3.14.6-slim-trixie@sha256:7bec7ddcddeff7975d6ba9b4be7dd6f6b2f55e7491539145e2978f7f97ce9144
ARG BUILD_VERSION=0.0.0-edge.47
ARG BUILD_VERSION=0.0.0-edge.49
ARG BUILD_ARCH
ARG DOMUS_SOURCE_COMMIT=6e35e7e97926753adea78e40b9669f4fd2a01d54
ARG DOMUS_SOURCE_COMMIT=0a95702a5f53911cc12c645bf7f6f2e8dcd626cd
LABEL io.hass.type="app" \
io.hass.version="${BUILD_VERSION}" \
io.hass.arch="${BUILD_ARCH}" \
Expand Down
7 changes: 7 additions & 0 deletions addon-edge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ original outcome after an interruption and open the created task from its receip
Edge.47 completes requested stops through explicit runtime cleanup. Restarting the
app retains its installation identity and original household operations.

Edge.48 lets task managers assign active household members, replace the selected
people and release eligible work from Tasks. A competing update retains the draft
for explicit review. Saved requests recover an interrupted assignment response.

Edge.49 enables assignment saving after the selected members change and explains
when the current selection already matches the task.

This candidate uses SQLite schema 34. Keep a
compatible image and cold data backup before upgrading a previous preview.
See [installation and operation](DOCS.md) for the source pin and rollback
Expand Down
18 changes: 9 additions & 9 deletions addon-edge/artifact.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"schemaVersion": 1,
"version": "0.0.0-edge.47",
"sourceCommit": "6e35e7e97926753adea78e40b9669f4fd2a01d54",
"sourceArchiveSHA256": "d1bfb1c259bcf87c3531da91ed7faebf75272c66f24ec69c05ab357f5bbd88dc",
"version": "0.0.0-edge.49",
"sourceCommit": "0a95702a5f53911cc12c645bf7f6f2e8dcd626cd",
"sourceArchiveSHA256": "0fcb5041bdb95712545b0deb6aec3ed2d8f545289cd034537f0d70ae78a71989",
"storageSchema": 34,
"wheelSHA256": "7695249a943695ab603f753c4976cd0d953dd6c3e945e0bba61ec7960423a12c",
"wheelSHA256": "b8141fd740b17282129a072802782182ff14971827514e427be87546c20ce469",
"pythonFiles": {
"domus/__init__.py": "7182c88b92234b4328f94497f4e70222d4390d8093e4b62893dfa78ac5530ac6",
"domus/application/__init__.py": "1e8c0c87bf2a8ca947112543070583c0cc55d9d40b56eab0d86ed59a4ec1e82c",
Expand Down Expand Up @@ -88,7 +88,7 @@
"domus/application/task_material_views.py": "1f4e1b52c17064b73e3c6502b38fc578a7589d68044279312c783b656e5aa5bf",
"domus/application/task_materials.py": "caa132a7b16fca293770deba3da149cf9bda2e24d4719abe9de39470d686698e",
"domus/application/task_ports.py": "165f04fc639310da0b742c8c2d58b2eadd459142720fdc138df384f34e53e35a",
"domus/application/task_queries.py": "24dd8792df559bc55725343a0c55f65158f4fbfec41808046a207af01e30d99d",
"domus/application/task_queries.py": "f5cf1da6bbb86386b05844d24a021ff8935fa92882c1261c650da2e3b3ee7347",
"domus/application/task_requests.py": "2e9ead8f5458d45335ec55bad50f5f7e12b42ee9b00ff54634f3ff681b320897",
"domus/application/task_reviews.py": "dcc288cda6cdcf5073bad4f24133b9d3496c0b0cf1272e8328e6df38129f3328",
"domus/composition/__init__.py": "a902d8faf7dd19da6829fb730d81e32d34ec38ee6cfafd676966a95d0ad31366",
Expand Down Expand Up @@ -175,7 +175,7 @@
"domus/entrypoints/schedule_creation_http.py": "2a3c3ea682f978eb2767dc8808a218c312861f31079cc2c76dbc3847ddec3197",
"domus/entrypoints/task_category_http.py": "e5443015f5e5cb2684eb6807e0a3bac5116703b5611508281afd7d1addee9672",
"domus/entrypoints/task_dto.py": "10657d1df0180bf05e71d1f38ac3214d2cea34c8822f50ea25ab331b9c014049",
"domus/entrypoints/task_http.py": "f83fb816f00becfb23fc28e953499803aadf43d229e17a5aca23a8147170fc76",
"domus/entrypoints/task_http.py": "fffefb1542eb545b45efe0e14467015e61babed51a6bc09a5978fc9c2673ab51",
"domus/entrypoints/task_response.py": "d2f4c0795aee429fc318b32495601031c559fa38af1d7da63b4735f7e6eb5d13",
"domus/entrypoints/ui_bundle.py": "beae3d4a7a57375ee195cca81efccdbc899d9db4286029d53eabaf30de6e14f7",
"domus/entrypoints/ui_http.py": "b6c47baa742f3862173a93e4121dc9914fd972eb6287ffffb9ffccecbf2ebe4a",
Expand Down Expand Up @@ -239,9 +239,9 @@
"domus/infrastructure/task_materials.py": "d5d2934e36f290c7bf44b473392f014eab8749f1f3b3d26a3402079e65d2818f"
},
"uiFiles": {
".vite/manifest.json": "857ddac99d888617f414cda4fbcedd4133a187b6d292750460dd8f66a732e588",
"assets/index-C5UQqRgD.js": "a7c554c95e87f2923fc82efcb873353ccf217241a0043375e9b58c09df6361fd",
".vite/manifest.json": "f4fdf822c622f2e96f1b01bf5c1cdbec895eb99b7fc118f8d4df54e4fd7d87b0",
"assets/index-BYTTreHd.js": "2eb864558eeff849ff8abb5aaab2409a1c6589ba3dc4d7cb09385ab9175fc001",
"assets/index-CjJnHZzV.css": "0f2c8c2e31576c0b64fe60373150f09390dafb896df6c07777b2a220ad430e48",
"index.html": "d795e3f20dc09de365a1427689e9474dc1e7fa284c43664724902d96a1620c0d"
"index.html": "eb9cf14a75ac42e824649a406b7d388978547a14d2d712251b92663b6954532b"
}
}
2 changes: 1 addition & 1 deletion addon-edge/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Domus Edge
version: "0.0.0-edge.47"
version: "0.0.0-edge.49"
slug: domus_edge
description: Development preview of the local Domus household application
url: https://github.com/vypdev/domus
Expand Down
1 change: 1 addition & 0 deletions backend/src/domus/application/task_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,7 @@ def original(self, action: str, key: str) -> OperationView:
if action not in {
"task.create",
"task.claim",
"task.assign",
"task.complete",
"task.verify",
"task.reopen",
Expand Down
2 changes: 1 addition & 1 deletion backend/src/domus/entrypoints/task_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
)

TaskWorkspaceAction = Literal[
"task.create", "task.claim", "task.complete", "task.verify", "task.reopen"
"task.create", "task.claim", "task.assign", "task.complete", "task.verify", "task.reopen"
]


Expand Down
2 changes: 2 additions & 0 deletions docs/contracts/household-api.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -9570,6 +9570,7 @@
"enum": [
"task.create",
"task.claim",
"task.assign",
"task.complete",
"task.verify",
"task.reopen"
Expand Down Expand Up @@ -31828,6 +31829,7 @@
"enum": [
"task.create",
"task.claim",
"task.assign",
"task.complete",
"task.verify",
"task.reopen"
Expand Down
2 changes: 2 additions & 0 deletions docs/contracts/native-household-api.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -9532,6 +9532,7 @@
"enum": [
"task.create",
"task.claim",
"task.assign",
"task.complete",
"task.verify",
"task.reopen"
Expand Down Expand Up @@ -31469,6 +31470,7 @@
"enum": [
"task.create",
"task.claim",
"task.assign",
"task.complete",
"task.verify",
"task.reopen"
Expand Down
2 changes: 1 addition & 1 deletion docs/evidence/graceful-shutdown-qualification.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The wheel SHA-256 is
The local ARM64 image is
`sha256:fa0964010fe5b0420bed3268084e7080356b208852467e5cfb780541396085a3`.
Its 231 Python files and four UI files match the
[artifact declaration](../../addon-edge/artifact.json) exactly.
[artifact declaration](https://github.com/vypdev/domus/blob/1237fbb9a8de2a4049056caef6f26f2be94e982a/addon-edge/artifact.json) exactly.

The signal scope has 21 statements and two branches. The focused CLI campaign
passed 28 cases, including the startup and listener-handoff regressions. The full
Expand Down
101 changes: 101 additions & 0 deletions docs/evidence/task-assignment-qualification.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Task assignment interface qualification

[Issue #141](https://github.com/vypdev/domus/issues/141) connects the protected
assignment command to the Tasks workspace. The owning companion is
[task assignment interface](../../specs/task-assignment-interface.md), alongside
the retained household task and execution contracts.

The editor follows the selected task's current `assign` action. It reuses the
authorized household roster, published ha-ui checkboxes and task request journal.
Current command authorization and expected revision govern every save. Provider
name availability and active household membership have separate meanings. A
missing provider name retains the canonical household identity as its label.
The existing public `task_assignee_denied` code preserves an authorized editor's
selection for correction. A current permission denial retires its protected view.

The real lost-response journey exposed a recovery gap. The existing workspace
original-request allowlist omitted `task.assign`, returning HTTP 422 after an
assignment had committed. Both the typed route and application query now admit
the assignment action through their existing recorded-authorization boundary.
The two published OpenAPI projections include that action. A recovered receipt
binds the occurrence, revision and assignee set to the frozen request.

| Published case | Executable evidence |
| --- | --- |
| task-assignment-interface-C01 | The [compiled assignment journey](../../frontend/tests/e2e/tasks.spec.ts) selects two named active members and checks the stored canonical identities and current projection. The [component cases](../../frontend/tests/task-component.test.ts) cover controlled ha-ui selection and deliberate save. |
| task-assignment-interface-C02 | The compiled journey replaces the set and releases work. The component tests enforce the in-progress minimum. The retained [command](../../tests/backend/test_task_commands.py) and [state policy tests](../../tests/backend/test_task_policy.py) exercise the authoritative state constraints. |
| task-assignment-interface-C03 | The [HTTP recovery regression](../../tests/backend/test_task_http.py) covers both compositions and current role revocation. The [query tests](../../tests/backend/test_task_queries.py) cover own-operation scope, explicit management exceptions and their revocation. Existing protected command tests reject restricted reassignment and unavailable household identities. |
| task-assignment-interface-C04 | The component tests distinguish pending discovery, successful empty discovery, denied access and unavailable reads, retain the draft, and expose refresh and removal of stale selections. Provider-name denial preserves canonical eligible options. |
| task-assignment-interface-C05 | Two authenticated browser tabs compete at the current revision. The losing editor retains its chosen member, shows the changed assignment and requires explicit review before a fresh save. The [controller tests](../../frontend/tests/task-controller.test.ts) also cover a conflict arriving after preflight and failed current reads. |
| task-assignment-interface-C06 | The compiled journey commits a release and drops its response. Reload and protected original-request recovery preserve the key, body and operation without another write. [HTTP decoding](../../frontend/tests/task-http.test.ts) refuses a receipt with a different assignee set. [Journal tests](../../frontend/tests/task-journal.test.ts) preserve assignment and older creation records together across reload. |
| task-assignment-interface-C07 | The [domain cases](../../frontend/tests/tasks.test.ts) admit empty release and one through 32 unique IDs, while refusing duplicates, malformed IDs and a 33rd selection. The normal composition decoder preserves those bounds. Backend assignment tests reject foreign, inactive and unsupported identities. |
| task-assignment-interface-C08 | Four compiled journeys exercise Ingress and standalone with English desktop keyboard and Spanish 390 px native touch. They cover editing, cancellation, multiple selection, save, conflict review and original-request recovery. Focus regressions cover the first choice, cancelled editor, failed validation and current-assignment review. |
| task-assignment-interface-C09 | Those journeys restart the actual composed runtime and recover the unchanged assignment operation, complete work under the actual performer, then restore the earlier checkpoint. An exact original PUT returns its historical result while the restored assignment and audit counts remain unchanged. [Restoration](../../tests/backend/test_task_restoration.py) and [history tests](../../tests/backend/test_sqlite_task_history.py) exercise durable original receipts and inspectable assignment history. |

The interface and recovery allowlist use storage schema 34 and the existing
assignment, receipt and restoration formats. The selected ha-ui version is
`0.1.0-next.2`.

Current-source Chromium qualification passes all four new compiled journeys.
The full frontend suite passes 1,840 cases with 100% of all four supported metrics
globally and per authored runtime file. The backend passes 5,513 cases with 100%
statement and branch coverage globally and across all 231 modules, independently
audited per file. Architecture-specific CI and final review are tracked in
[PR #142](https://github.com/vypdev/domus/pull/142).

## Immutable candidate

Edge.49 uses runtime source `0a95702a5f53911cc12c645bf7f6f2e8dcd626cd`.
Its source archive SHA-256 is
`0fcb5041bdb95712545b0deb6aec3ed2d8f545289cd034537f0d70ae78a71989`.
The measured Linux wheel SHA-256 is
`b8141fd740b17282129a072802782182ff14971827514e427be87546c20ce469`.
All 231 Python modules match Git and the installed Linux builder. Its four
compiled UI files also match the independently built local bundle.
The [artifact declaration](../../addon-edge/artifact.json) records those exact bytes.

The ARM64 image is
`sha256:8d22fdce04f46fbd2567635e3f3d5a968f3788dc2d79efc8af1c0fd57aa78baf`.
Nine actual-image cases passed, covering every declared Python/UI file, native
authority and restart, private standalone delivery, an actual Edge.5 upgrade and
restore, repeated SIGTERM cleanup, and all four real-Core deployment compositions.
The four assignment browser journeys also passed against this exact packaged
image in Ingress and standalone, with English keyboard and Spanish native touch.

The earlier Edge.48 CI campaign exposed a browser-test bootstrap race after standalone
restart. The test selected Spanish while authentication was still loading, then
waited for Spanish navigation after the completed bootstrap selected English.
The journey now waits for authenticated navigation before changing language.
All four assignment journeys passed three consecutive repetitions against Edge.48.
The corrected Edge.49 image passes the four journeys with the unchanged-selection
assertions in 43.4 seconds. Its nine pinned-image cases pass in 104.58 seconds.
Consult PR #142 for installed Edge.49 acceptance and the CI and review status.

## Earlier Home Assistant Edge.48 acceptance

Chrome verified installed version `0.0.0-edge.48` using the Action-managed issue
branch and the synthetic household `Domus QA 141 Edge48`. English keyboard input
assigned a task, retained an empty draft across two competing updates, focused
explicit current-assignment review and deliberately released the task. The
390 px Spanish touch journey assigned, cancelled an edit, released and reassigned
another task. Dark-theme text, focus and the assignment controls were legible.

The app stopped with Home Assistant's `Detenido` state and restarted successfully.
Both task identities persisted. The released desktop task retained revision 5
and the assigned mobile task retained revision 4. Checking the saved assignment
after restart recovered its recorded operation. The isolated-image SIGTERM cases
also require a zero exit status.

## Unchanged assignment correction

Review found that saving the current selection reached the existing backend's
`task_unchanged` conflict and showed current-version review unnecessarily. The
editor now compares canonical member sets, disables an unchanged save and explains
how to enable it in English and Spanish. Reordering the same selected members
keeps that guard. A competing update that already applies the retained selection
also leaves save disabled after explicit review.

Seven component regressions reproduced the issue before the correction. The four
compiled assignment journeys now check the initial unchanged state and changing
the selection back to its original set. Edge.49 packages the correction, with its
installed acceptance tracked in PR #142.
Loading