You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(job): opt-in per-attempt history (wheels_job_attempts) #4497
Problem (today on develop). A job keeps one row with only its last error (lastError). When a job is retried, earlier attempts leave no trace: which server ran each attempt, when it started and ended, and how it ended.
Proposed change. An opt-in per-attempt history table:
Rows. One row is written when an attempt is claimed and finished when it ends. The outcome is completed, retried, failed, fenced, deferred (busy lease) or reaped.
Paths. It covers the worker path and processQueue().
Reason: this is a new opt-in feature (new wheels_job_attempts table + setting + both worker paths + cross-engine coverage), explicitly parked for a later release; it is not a regression and has no community demand attached right now. No implementation exists on develop — verified: no wheels_job_attempts, no attempts setting, no --attempts flag.
At the 2026-11-11 recheck we'll confirm whether the 4.3 line wants it; if yes, a design brief (table shape, retention, worker paths, settings) comes first. Until then the issue stays open as the record.
Still no implementation on develop 8570dee75: no wheels_job_attempts table, no attempts setting or flag, no migration, and no CLI read path. vendor/wheels/JobSchema.cfc defines four job tables (wheels_jobs, wheels_job_hosts, wheels_job_schedules, wheels_job_locks). wheels_jobs has an attempts counter, lastError, claimedBy, claimToken, heartbeatAt, failedAt and completedAt, but only current/last state.
Overlapping behavior today:
attempts increments on claim and drives maxRetries/backoff; retryFailed() resets attempts to 0; lastError is only the latest; a retry overwrites the previous error.
jobsOnFailure/onFailure receive {jobId, jobClass, queue, attempt, maxRetries, isFinal, error} once, but do not persist history.
Claim fencing uses claimToken/claimedBy; fenced attempts only write a wheels_jobs log entry; reaped/deferred outcomes update the job row.
Smallest shippable slice: add the JobSchema table (jobId, attempt, claimedBy, startedAt, finishedAt, outcome, error; jobId+attempt key/index), an opt-in setting defaulting off, writes at claim and at every terminal/reap/fence/defer outcome, purge retention, and a read helper/CLI. That is roughly 2–3 engineer-weeks including cross-engine/tenant tests, schema/install changes and docs; ongoing maintenance is real, and it introduces a new public schema surface and migration/installation story.
Recommendation: defer, not close. No implementation or demand has appeared in the issue history; the attempt counter and failure hooks cover the basic operational signal, while per-attempt history is a public schema feature with real retention/testing cost and no agreed read API. Leave it open as the record; a short design brief (keys, retention, worker paths, read shape) should precede implementation when a concrete operator need appears.
I could not verify any demand or support signal beyond the issue history; there is no implementation to exercise.
Decision: deferring again — not closing. New recheck: 2026-03-01.
Re-verified against current develop (7a3ff4c33), not assumed from the last review
Still no implementation. No wheels_job_attempts table, no jobAttempts-style setting, and no flag anywhere in the tree — git grep -i "wheels_job_attempts\|jobAttempts\|attemptHistory\|job_attempts" returns nothing.
The adjacent machinery is real and already covers the reporting shape, which is exactly why this keeps looking nearly-done: retry/attempt semantics and jobsOnFailure in vendor/wheels/Job.cfc, schema in JobSchema.cfc, worker/heartbeat/fencing in JobWorker.cfc, and five wheels jobs commands (retry, status, monitor, purge, work).
None of that records per-attempt history. A job that fails three times and succeeds on the fourth leaves no trace of the two failures once state moves on. That is a genuine gap, not a misunderstanding of what exists.
The smallest shippable slice is still a new public schema surface — a per-attempt table plus its retention/pruning story — with ongoing maintenance cost for every supported database. That cost is what keeps losing to the value, and nothing has changed that.
Reopen condition — this is the decision, not the date
Build this if per-attempt history becomes necessary for diagnosing a real failure that retry/attempt semantics cannot explain.
If a report arrives where someone cannot answer "what actually happened on attempts 1 and 2" from logs, job state, or the wheels jobs commands, that report is the trigger — link it here and this becomes a scoped bug fix with a concrete observer rather than a schema proposal. Absent such a report, the next recheck should ask the same question and expect the same answer; re-deferring without a new trigger is the correct outcome, not a failure to act.
Activity
bpamiri commentedon Oct 11, 2026
Feature request; planned for a later release.
bpamiri commentedon Oct 28, 2026
Maintainer-sweep disposition: deferred (not abandoned), recheck 2026-11-11.
Reason: this is a new opt-in feature (new
wheels_job_attemptstable + setting + both worker paths + cross-engine coverage), explicitly parked for a later release; it is not a regression and has no community demand attached right now. No implementation exists ondevelop— verified: nowheels_job_attempts, no attempts setting, no--attemptsflag.At the 2026-11-11 recheck we'll confirm whether the 4.3 line wants it; if yes, a design brief (table shape, retention, worker paths, settings) comes first. Until then the issue stays open as the record.
bpamiri commentedon Nov 15, 2026
Rechecking after the 2026-11-11 date.
Still no implementation on develop
8570dee75: nowheels_job_attemptstable, no attempts setting or flag, no migration, and no CLI read path.vendor/wheels/JobSchema.cfcdefines four job tables (wheels_jobs,wheels_job_hosts,wheels_job_schedules,wheels_job_locks).wheels_jobshas anattemptscounter,lastError,claimedBy,claimToken,heartbeatAt,failedAtandcompletedAt, but only current/last state.Overlapping behavior today:
attemptsincrements on claim and drivesmaxRetries/backoff;retryFailed()resetsattemptsto 0;lastErroris only the latest; a retry overwrites the previous error.jobsOnFailure/onFailurereceive{jobId, jobClass, queue, attempt, maxRetries, isFinal, error}once, but do not persist history.claimToken/claimedBy; fenced attempts only write awheels_jobslog entry; reaped/deferred outcomes update the job row.wheels jobs statusreports counts;wheels jobs installgenerates the schema fromJobSchema;retry,purgeandmonitorCLI verbs are still docs/cli:wheels jobs ...worker CLI is advertised (observability guide + root CLAUDE.md) but does not exist #3090;purgeCompleted()deletes completed job rows. None of these stores per-attempt history.Smallest shippable slice: add the
JobSchematable (jobId,attempt,claimedBy,startedAt,finishedAt,outcome,error;jobId+attemptkey/index), an opt-in setting defaulting off, writes at claim and at every terminal/reap/fence/defer outcome, purge retention, and a read helper/CLI. That is roughly 2–3 engineer-weeks including cross-engine/tenant tests, schema/install changes and docs; ongoing maintenance is real, and it introduces a new public schema surface and migration/installation story.Recommendation: defer, not close. No implementation or demand has appeared in the issue history; the attempt counter and failure hooks cover the basic operational signal, while per-attempt history is a public schema feature with real retention/testing cost and no agreed read API. Leave it open as the record; a short design brief (keys, retention, worker paths, read shape) should precede implementation when a concrete operator need appears.
I could not verify any demand or support signal beyond the issue history; there is no implementation to exercise.
bpamiri commentedon Dec 1, 2026
Decision: deferring again — not closing. New recheck: 2026-03-01.
Re-verified against current
develop(7a3ff4c33), not assumed from the last reviewwheels_job_attemptstable, nojobAttempts-style setting, and no flag anywhere in the tree —git grep -i "wheels_job_attempts\|jobAttempts\|attemptHistory\|job_attempts"returns nothing.jobsOnFailureinvendor/wheels/Job.cfc, schema inJobSchema.cfc, worker/heartbeat/fencing inJobWorker.cfc, and fivewheels jobscommands (retry,status,monitor,purge,work).Reopen condition — this is the decision, not the date
Build this if per-attempt history becomes necessary for diagnosing a real failure that retry/attempt semantics cannot explain.
If a report arrives where someone cannot answer "what actually happened on attempts 1 and 2" from logs, job state, or the
wheels jobscommands, that report is the trigger — link it here and this becomes a scoped bug fix with a concrete observer rather than a schema proposal. Absent such a report, the next recheck should ask the same question and expect the same answer; re-deferring without a new trigger is the correct outcome, not a failure to act.