Skip to content

docs(exceptions): clarify handled state for job retries - #205

Merged
marandaneto merged 1 commit into
mainfrom
docs/retried-task-handled
Nov 10, 2026
Merged

marandaneto merged 1 commit into
mainfrom
docs/retried-task-handled

Conversation

@marandaneto

Copy link
Copy Markdown
Member

Summary

Clarifies which application boundary determines mechanism.handled for framework-managed job retries. A framework retry handler that consumes the failure and schedules another execution reports it as handled. A terminal failure that escapes job execution remains unhandled.

This does not require integrations to report retries or change reporting defaults. It preserves the independent handled-state rules for nested exceptions.

Requested in PostHog/posthog-ruby#336 (comment). The Ruby fix is in PostHog/posthog-ruby@9f5b5e1.

Validation

  • Added consumed-retry and escaping-terminal scenarios to the existing requirement.
  • Validated the OpenSpec delta, synced it into the canonical spec, and archived the complete change on this branch.
  • openspec validate --specs --strict: 69 passed, 0 failed.
  • git diff --check: passed.
  • Ruby evidence: retry assertions failed before the metadata fix and passed afterward on real Active Job 7.2.3.1 and 5.2.8.1 lifecycles. Full base and optional OpenTelemetry suites each passed 2,198 examples with no failures. The 5.2 harness is standalone Active Job, not a booted Rails application.

Autoreview was skipped because this branch contains only spec documentation and archived change metadata.

Agent context

Human-driven, agent-assisted. marandaneto approved the behavior and publication. Pi used local file tools, Git, GitHub CLI and OpenSpec. Both commits are signed. Human review is required.

@marandaneto marandaneto self-assigned this Nov 10, 2026
@marandaneto
marandaneto marked this pull request as ready for review November 10, 2026 08:29
@marandaneto
marandaneto requested a review from a team as a code owner November 10, 2026 08:29

@ioannisj ioannisj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 An AI agent wrote this on behalf of @ioannisj.

No findings from me. The retry boundary wording matches what landed in posthog-ruby#336 (handled => retry_failure in posthog-rails/lib/posthog/rails/active_job.rb), the Celery integration still fits the no-retry-reporting clause, and the archived delta matches the canonical sync.

@marandaneto
marandaneto merged commit 4e1ab05 into main Nov 10, 2026
11 checks passed
@marandaneto
marandaneto deleted the docs/retried-task-handled branch November 10, 2026 14:04
turnipdabeets added a commit that referenced this pull request Nov 10, 2026
…52f899 and #146 d387ab7

Capture, Capture Exception and Capture AI move to Pass now that null-valued
properties are omitted (posthog-ios#1047) and the SDK fills its own $lib pair
after the caller's properties (posthog-ios#1050). On Feature Flags moves to
Pass: loads in flight across reset() are dropped (posthog-ios#1048) and empty
variants are left out of listener flags. HTTP Client is scored Pass on its
merits, since #146 now leaves a lane with its own compression setting out of
the whole-client opt-out. Surveys stays Partial only for the popup-delay
eligibility re-check (SHOULD); posthog-ios#1049 fixed the rest.

Opt In meets the new deferred-crash consent requirement (#199); the empty
variant (#193), variant key rename (#203) and job-retry (#205) changes need no
other status change. Line references move to e27cbe4cb.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
turnipdabeets added a commit that referenced this pull request Nov 11, 2026
* chore(compliance): audit posthog-ios 4.0

Re-audit all 64 posthog-ios rows at 3460e534a (4.0 release branch)
against sdk-specs dd11a6b, add the five rows added to the README table
since the last audit, and update the iOS roll-up and gap entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(compliance): score posthog-ios HTTP Client partial

compression = .none leaves captureAi requests gzipped through the
separate captureAiCompression setting, so iOS 4.0 has no whole-client
compression opt-out. Roll-up becomes 40/17/1/11 (58%), 18 gaps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(compliance): list iOS capture v1 retries as matching #146

Draft #146 already permits the client-SDK durable queue, unlimited
attempts, 1-30 s backoff and multi-event 413 halving for iOS 4.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(compliance): score posthog-ios Session Replay Privacy partial

SwiftUI's postHogMask() wins over an enclosing postHogNoMask(), the
reverse of the spec's unmask-over-mask precedence. It over-masks rather
than leaks. Roll-up becomes 39/18/1/11 (57%), 19 gaps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(compliance): re-check posthog-ios 4.0 at 1f91c5b2 against main and #146

Re-checks the iOS audit at 1f91c5b2 and sdk-specs 8306698. #1036 keeps
$lib/$lib_version, which now matches #146. Opt In meets the #138 replay
restart requirements. Surveys gains a #102 gap: setSurveySeen moves the
last-seen date on submit and dismiss. HTTP Client goes back to ✅: its
compression gap comes from conflicting http-client and capture-ai rules in
#146, raised on that PR. Tally 40/17/1/11.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(compliance): score posthog-ios 4.0 capture v1 rows against #146 as merged

Scores Capture, Capture AI, Before Send Hook, Event Batcher, HTTP Client and
Retry Queue against #146 at 5c26b9b, treated as merged. The capture v1 wire,
transport and retry policy conform. Capture AI applies to iOS 4.0 and is 🟡
for the same NSNull serialization gap as Capture; starting the AI queue at
setup is what #146 asks of client SDKs. Tally 40/18/1/10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(compliance): treat the #146 $lib precedence conflict as resolved for clients

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(compliance): re-check posthog-ios 4.0 at e27cbe4cb against main 752f899 and #146 d387ab7

Capture, Capture Exception and Capture AI move to Pass now that null-valued
properties are omitted (posthog-ios#1047) and the SDK fills its own $lib pair
after the caller's properties (posthog-ios#1050). On Feature Flags moves to
Pass: loads in flight across reset() are dropped (posthog-ios#1048) and empty
variants are left out of listener flags. HTTP Client is scored Pass on its
merits, since #146 now leaves a lane with its own compression setting out of
the whole-client opt-out. Surveys stays Partial only for the popup-delay
eligibility re-check (SHOULD); posthog-ios#1049 fixed the rest.

Opt In meets the new deferred-crash consent requirement (#199); the empty
variant (#193), variant key rename (#203) and job-retry (#205) changes need no
other status change. Line references move to e27cbe4cb.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(compliance): score posthog-ios Surveys as pass

The popup-delay and wait-period SHALLs are met since posthog-ios#1049. The
one unmet requirement is a SHOULD (re-check eligibility when the delay
elapses), which is recorded but not scored. Totals become 45/13/1/10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(compliance): score iOS Exception Steps partial on NSNull normalization

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(compliance): score posthog-ios Capture partial until the migration guide shows the identity call option

#146 at 15501ca requires migration guides to show a per-call
process_person_profile: true on identity calls; MIGRATION.md at e27cbe4cb
lacks it until PostHog/posthog-ios#1053 merges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(compliance): note the README's 69 contracts and the iOS row's 69-row basis

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(compliance): keep posthog-ios Capture passing while tracking 4.0

The identity-call migration-guide example #146 requires lands in 4.0 with
PostHog/posthog-ios#1053, which targets the release branch. This audit
tracks 4.0, so a pending release-branch PR is noted rather than scored as a
gap. Reverts 85d4acd.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(compliance): make the 69-contract README note SDK-neutral

The same paragraph lands from both the iOS and Android 4.0 audits, so it
merges cleanly in either order and stays true after both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants