Skip to content

docs(spec): JobHandler docblock states degraded consumption is wired - #10434

Merged
qq9340100 merged 1 commit into
mainfrom
claude/issue-10266-jobhandler-degraded-docblock
Aug 21, 2026
Merged

docs(spec): JobHandler docblock states degraded consumption is wired#10434
qq9340100 merged 1 commit into
mainfrom
claude/issue-10266-jobhandler-degraded-docblock

Conversation

@qq9340100

Copy link
Copy Markdown
Collaborator

Fixes#10266

What was stale

JobHandler's docblock in packages/spec/src/contracts/job-service.ts still said
consuming a { outcome: 'degraded' } resolution was "not yet wired" — that the
shipped adapters discarded the value, and that this was precisely why doing so was
safe. #7072 landed the wiring and inverted both halves of that sentence: the value
is consumed, and the "safe because unread" argument no longer holds.

Re-measured against current main

  • packages/services/service-job/src/cron-job-adapter.ts
    if (outcome && outcome.outcome === 'degraded') { execution.status = 'degraded'; execution.error = outcome.reason; }
  • packages/services/service-job/src/interval-job-adapter.ts — same mapping
  • packages/services/service-job/src/db-job-adapter.ts — settles the run as
    degraded (onAttemptSettled), writes the reason to error / last_error
    (bumpJob), and leaves failure_count flat
  • packages/platform-objects/src/audit/sys-job-run.object.ts and sys-job.object.ts
    — both status / last_status selects carry degraded in their ObjectQL-enforced
    vocabularies, each with a [#7072] comment pinning them to JobExecutionStatus

The fix

Rewrote the "not yet wired" paragraph to state the wired behaviour, aligned in
wording with JobExecutionStatus's already-correct TSDoc in system/job.zod.ts
(same "NOT a failure, never retries" framing, same reason-in-error-column /
failure_count-flat facts) rather than inventing a third phrasing. The #5548/#6617
framing above the paragraph is untouched. No signature or type change (Clause-②: no).

Changeset

Skipped, following the #10168 precedent (JSDoc/TSDoc block-comment change, not a
Zod .describe() call, no changeset) rather than #10173's (which changed
.describe() text feeding generated reference docs and shipped one). This PR
touches only a /** ... */ block comment above a type alias — no .describe(),
no generated reference page derives from it (verified: no match for job-service,
JobHandler, or JobRunOutcome under content/docs).

Tests

Prose-only change to a docblock; no behaviour, type, or test-visible surface
changed. Verified by re-reading the three adapters and the two enforced select
vocabularies on current main (excerpts above) rather than by transcribing the
issue card's measurements.

Gates run against node scripts/pm/dispatch-gates.mjs's named list (all VERDICT
command-exit 0, re-run at 176acc71c — identical tree to what was staged, no
further edits after):

  • pnpm check:changeset-gate-self-tests, pnpm check:cross-package-test-inputs,
    pnpm check:merge-driver, pnpm check:slot-lookup, pnpm check:spec-parsed-alias,
    pnpm check:type-source-resolution
  • pnpm --filter @objectstack/lint run check:doc-formula-expressions
  • pnpm --filter @objectstack/spec run check:empty-state / check:liveness / check:strictness-ledger / check:variant-docs
  • node scripts/check-adr-0087-registration.mjs, node scripts/check-dev-prereqs.mjs
    (after a full pnpm build), node scripts/docs-audit/check-affected-docs.mjs
  • pnpm --filter @objectstack/spec typecheck (tsc --noEmit clean; test-typecheck
    debt ledger unchanged, shrink-only)

Generated by Claude Code


Generated by Claude Code

…10266)
The `JobHandler` TSDoc's "not yet wired" paragraph was inverted twice over by
#7072's landing: consuming a resolved `{ outcome: 'degraded' }` is no longer
discarded, and "safe because unread" no longer holds.
Re-measured against current main:
- cron-job-adapter.ts and interval-job-adapter.ts map a resolved `degraded`
outcome onto `execution.status = 'degraded'` / `execution.error`.
- db-job-adapter.ts settles the run as `degraded`, writes the reason to
`error` / `last_error`, and leaves `failure_count` flat.
- sys_job_run.status and sys_job.last_status both carry `degraded` in their
ObjectQL-enforced select vocabularies (#7072), pinned to stay in step with
JobExecutionStatus.
Rewrote the paragraph to state the wired behaviour, aligned in wording with
JobExecutionStatus's already-correct TSDoc in system/job.zod.ts rather than
inventing a third phrasing. The #5548/#6617 framing above stays untouched.
Prose only — no signature or type change (Clause-②: no).
No changeset: JSDoc/TSDoc block-comment change, not a Zod `.describe()` call
that feeds generated reference docs — same precedent as #10168, not #10173.
Claude-Session: https://claude.ai/code/session_016gcKVsiywU9CcS96S5t9qD
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)), so this run has no opinion about the docs.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/spec/src/contracts/job-service.ts) — pages documenting those are invisible to this run

Coarse fallback — 116 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 6276651dc1ece03f93f17227ac957b908a2dbd9epackageMentionDocs.

@qq9340100qq9340100 added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Aug 20, 2026 — with Claude
@qq9340100
qq9340100 marked this pull request as ready for review August 21, 2026 00:56
@qq9340100
qq9340100 added this pull request to the merge queueAug 21, 2026
Merged via the queue into main with commit cab60aeAug 21, 2026
32 checks passed
@qq9340100
qq9340100 deleted the claude/issue-10266-jobhandler-degraded-docblock branch August 21, 2026 01:53
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/sskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[finding] JobHandler's docblock still says degraded consumption is "not yet wired" — all three adapters have mapped it since #7072

2 participants

@qq9340100@claude