Skip to content

Preserve primary journal errors when failure-observation writes fail #853

Open

Description

@coneilen

Describe the bug
The production journal reader can replace an original Open/Copy/final-manifest failure with JournalObservationFailure when writing that failure's diagnostic also fails. The OpenFailed, CopyFailed and FinalManifestOpenFailed callsites invoke Write-CapJournalObservation directly before completing their primary-error handling.

This is the pre-existing, separately deferred risk identified during #851 / #848, still present after #852. It is distinct from the actor-cleanup message masking addressed by #852 R3.

To reproduce
Source-derived test recipe; a deterministic runtime reproduction of these three paths has not been executed for this issue:

  1. Arrange an original journal Open, Copy, or final-manifest Open failure.
  2. Make the corresponding observation sink unavailable, for example an observation path that cannot be opened/written.
  3. Exercise each existing failure path. The observation helper can throw before the caller rethrows/classifies the original failure, making the secondary diagnostic failure the surfaced primary.

Add focused injected-sink tests for each path before implementing the correction. The existing deadline-observer test establishes preservation only for Assert-CapJournalTime, not these three callsites.

Expected behavior
Retain the original exception/native HRESULT and applicable typed journal classification as the primary cause, while surfacing the observation-write failure explicitly as a secondary diagnostic. Reuse the existing deadline path's preservation pattern where appropriate; do not silently swallow diagnostic errors or return success.

Keep the 1000ms budget, retry/attempt caps, absolute deadlines, terminal-only durability policy, success-observation counts and cleanup assertions unchanged. Scope this small follow-up to the three production failure paths, related tests and directly related documentation.

Screenshots
None. This is an offline journal/error-handling issue; no GUI capture is involved.

Environment

  • GraphCode version: merged commit 77ec22136a99f55e7d0be00ce37979525753a57f from Keep journal retry observations buffered until terminal failure #852.
  • macOS version: not applicable; source-derived Windows journal-reader risk, with no macOS reproduction or safety claim.
  • Backend: offline Windows journal/file-I/O contracts; no paid backend or model interaction required.

Additional context
Relevant persisted callsites:

#852 deliberately limited primary-error preservation to the deadline-observation path and improved the separate test-harness actor-primary message. Its local/hosted green results do not establish injected-observer-failure behavior for these three production paths. No fix, new native run or budget change is assigned by filing this tracker.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions