Skip to content

feat(diagnostics): observe WorkManager framework failures safely - #207

Draft
MrFr3di wants to merge 5 commits into
mainfrom
feat/workmanager-failure-observation-191
Draft

feat(diagnostics): observe WorkManager framework failures safely#207
MrFr3di wants to merge 5 commits into
mainfrom
feat/workmanager-failure-observation-191

Conversation

@MrFr3di

@MrFr3di MrFr3di commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Closes #191

Purpose

Host-first, secret-safe WorkManager failure observation under #179. This PR remains draft and currently contains only O1.1: the platform-neutral typed failure contract plus its RED→GREEN evidence. WorkManager callback wiring, bounded recorder/store, Doctor projection and device acceptance are not part of the current implementation yet.

O1.1 TDD evidence

RED — observed

RED commit: 2516d8120c4c8535382c79654585b948b29daae2.

A real Gradle execution reached :core:common:compileTestKotlin and failed specifically because these production symbols did not exist yet:

  • BackgroundWorkFailureKind;
  • BackgroundWorkerCategory;
  • BackgroundWorkFailureObservation.

The contract requires four stable WorkManager failure families, a closed worker-category vocabulary, no raw String/Throwable payload, deterministic value semantics and rejection of negative timestamps.

Minimal GREEN — verified

Implementation commit: 24b33931ce4ee09044e5ae467748de696d95a263.

Hosted-sync head: 7663cccb6d8eafeff4062be4a6ae4494e2056da3.

GitHub-hosted Hosted validation run 33048709750 completed SUCCESS on that exact head. O1.1 is therefore an accepted RED→GREEN checkpoint; the former self-hosted/no-verdict wording is obsolete.

Architecture boundary

The typed observation model remains platform-neutral and deliberately does not reuse generic diagnostic events capable of carrying arbitrary text. WorkManager remains owner of scheduling/retry/failure semantics. Later callbacks must be non-throwing and must never persist raw throwable text, URL/token/title or other secret-bearing data.

Remaining sequence

  1. O1.2 RED for a bounded in-memory recorder/store;
  2. minimal O1.2 GREEN: fixed capacity, newest-first snapshot, consecutive duplicate coalescing by typed identity with count/latest timestamp, no raw text/Throwable;
  3. O1.3 RED/GREEN for the four Configuration.Builder failure callbacks behind a small adapter/factory;
  4. coarse Doctor/export projection;
  5. exact hosted validation;
  6. canonical API26 + API36 smoke only when the Android adapter exists.

Boundaries

Do not mark ready or merge until the remaining O1 slices are independently RED→GREEN and the adapter has hosted/device acceptance.

@MrFr3di MrFr3di closed this Aug 25, 2026
@MrFr3di MrFr3di reopened this Aug 26, 2026

MrFr3di commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator Author

O1.1 exact-head GREEN checkpoint.

Current head: 24b33931ce4ee09044e5ae467748de696d95a263.

Self-hosted validation run 32997056529, job 98268962147 executed on the dedicated Windows runner and completed the substantive repository workload successfully:

  • checkout / wrapper / preflight: PASS;
  • dirty-runner admission + exact-head harness/device-routing contracts: PASS;
  • two-AVD / repository truth / evidence-publication static contracts: PASS;
  • Run MuxTV validation: PASS;
  • runner reset/cleanup: PASS.

The workflow-level conclusion is red only because mandatory evidence artifact publication failed afterward under the separately owned storage-capacity problem (#209). Publication acceptance remains fail-closed; that transport/capacity failure does not invalidate the already completed O1.1 test/build workload.

This closes the executable O1.1 RED -> minimal implementation -> exact-head substantive GREEN loop. It authorizes the next TDD step (O1.2 bounded typed store RED), but does not make #207 ready to merge: O1.2/O1.3/Doctor integration and final acceptance remain pending.

Critical-path scheduling note: after this GREEN the singleton runner is being reserved for one exact-source U0 retry before another #207 push, so O1.2 will not be allowed to compete with U0.

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.

Diagnostics: add secret-safe WorkManager failure observation hooks

1 participant