A Laravel 13 service that refreshes creator profile data from an upstream
API, built to a spec (SPEC.md / SETUP.md, not included in this repo) whose
whole point was a specific incident: a queue worker reporting 100% success
while silently corrupting every row it touched. Sections below follow that
spec's own outline; git log follows its build order commit-by-commit.
app/Jobs/RefreshProfile.php was committed in a deliberately broken
state (SPEC.md build order, step 2): it reads likes from the top level of
the upstream response only, defaults a missing value to 0 with ?? 0, and
marks every response — including errors — as a successful refresh. It never
looks at revision, so it has no defence against stale or duplicate writes
either.
The old_format fixture happens to carry the same likes/revision values
as the seed profile, which is exactly why this kind of regression is easy to
miss in the wild: the shape that used to work keeps looking like it works,
while every other response — including a well-formed one in the newer shape
— silently zeroes out likes and stamps the profile as freshly succeeded.
Run against the broken handler above, before any fix:
$ ./vendor/bin/pest --colors=never
FAIL Tests\Feature\RefreshProfileTest
⨯ new format is accepted over a newer revision 0.40s
✓ old format is still accepted 0.02s
⨯ missing likes is rejected as an invalid payload 0.02s
⨯ a 500 with an empty body is treated as a failure 0.02s
⨯ a 429 releases the job instead of marking it successful 0.02s
⨯ duplicate execution applies the revision once 0.02s
⨯ an older revision arriving last is rejected as stale 0.02s
────────────────────────────────────────────────────────────────────────────
FAILED Tests\Feature\RefreshProfileTest > new format is accepted over a…
Failed asserting that 0 is identical to 121000.
FAILED Tests\Feature\RefreshProfileTest > missing likes is rejected as a…
Failed asserting that 0 is identical to 120000.
FAILED Tests\Feature\RefreshProfileTest > a 500 with an empty body is tr…
Failed asserting that 0 is identical to 120000.
FAILED Tests\Feature\RefreshProfileTest > a 429 releases the job instead…
Failed asserting that false is true.
FAILED Tests\Feature\RefreshProfileTest > duplicate execution applies th…
Failed asserting that 10 is identical to 11.
FAILED Tests\Feature\RefreshProfileTest > an older revision arriving las…
Failed asserting that 0 is identical to 121000.
Tests: 6 failed, 1 passed (9 assertions)
Duration: 0.58s
Only "old format is still accepted" passes, and only by coincidence — the
fixture's likes/revision (120000/10) match the seed profile exactly, so
the broken handler's blind ?? 0 overwrite happens to write back the value
that was already there. Every other case — a newer revision in the new
shape, a missing likes key, a 500, a 429, a duplicate run, and a stale
revision arriving late — is silently accepted as success and either zeroes
likes or clobbers newer data. That is the incident.
Three new pieces, each with one job:
App\Upstream\ProfileResponse— the only code allowed to decide whether a payload is usable. Readsprofile.likeswhen theprofilekey exists, else top-levellikes; if both are present it prefersprofile.likesand logs a warning. A missinglikeskey isinvalid_payload— never defaulted to0.0itself is a valid value. Negative or non-numericlikes/revisionisinvalid_payload. Only fields that actually validated get returned (an omitteddisplay_namecomes backnull, not overwritten).App\Actions\ApplyProfileUpdate— the single conditionalUPDATEfrom SPEC.md section 4:WHERE username = ? AND (revision IS NULL OR revision < ?). No read-then-write, no lock held across the HTTP call. Zero rows affected means eitherrejected_staleor that no profile exists for this username at all — distinguished explicitly, see the correction below; conflating the two used to report a missing profile as if it were merely out of date, forever. If the row exists, is at the same revision as the incoming one, but the likes differ, it logs a loud warning — that inconsistency is exactly the class of signal that would have caught the original incident earlier.App\Upstream\UpstreamClient— makes the real HTTP call and classifies only transport-level failures (429, 5xx, connection timeout) before any body is ever parsed. Everything else is handed toProfileResponseuntouched.
Correction (post-review). Zero rows affected by the conditional
UPDATEwas unconditionally reported asrejected_stale. That's wrong when the real reason is that no profile row exists for the username at all — a case the workload command never surfaces (it always seeds profiles first), but a job dispatched for an unknown username reported "stale" forever and created nothing, which is a silently wrong outcome presented as a normal one — precisely the failure class this whole exercise is about. Fixed by checking explicitly: after a zero-row update,ApplyProfileUpdatelooks the profile up once more and returns a distinctOutcome::ProfileNotFoundif it doesn't exist, rather than guessingrejected_stale. That SELECT only happens on the already-rare zero-rows path, after the one conditionalUPDATEhas already made the real decision — it doesn't reopen a read-then-write window for the write itself.
ProfileNotFoundisn't one of SPEC.md section 2's seven outcomes — those classify the upstream response; this is a local condition about whether a row exists at all, which the spec's data model didn't anticipate. Added as an eighthOutcomecase anyway, rather than a separate return type, so it flows through the same logging and workload-metrics path every other outcome already does; the alternative (a nullable return, special-cased everywhere) would have meant duplicating that path for one rare case.Chose not to have the job silently create the missing row instead. A
RefreshProfilejob's contract is to update data that's presumed to already exist (fromprofiles:enqueue-dueor direct dispatch against a known profile); deciding a username is real enough to materialize a new row is a bigger, different decision — closer to account provisioning/onboarding — that a refresh job shouldn't make silently on its own.ProfileNotFoundis treated as terminal, likeinvalid_payload:$this->fail(...)immediately, no retry (retrying can't make a row appear), and norecordFailure()call either, since there is no row to writelast_failure_at/last_failure_reasononto. Seetests/Feature/RefreshProfileTest.php's "no profile row" tests.
Validation has to run before anything touches the database, not after,
because the broken handler's entire failure mode was persistence without
validation: it wrote whatever the response happened to contain (or 0)
and only asked "did the write succeed?", never "was this data any good?".
Splitting ProfileResponse out from the database write is also what makes
it possible to unit-test every validation rule in tests/Unit/ ProfileResponseTest.php without touching Postgres, and then feature-test
the conditional-write guard in tests/Feature/RefreshProfileTest.php
without re-testing validation.
RefreshProfile itself is now a thin coordinator: fetch via
UpstreamClient, parse via ProfileResponse, and only call
ApplyProfileUpdate once a response is accepted. All 18 tests pass
(7 required + 11 unit/extra):
Tests\Unit\ProfileResponseTest
Tests\Feature\RefreshProfileTest
Tests: 18 passed (38 assertions)
Workload: two accounts (acct-a, acct-b), three profiles each, six
profiles total (app/Console/Commands/RunWorkload.php). Each run resets the
fake upstream to mode=ok, format=new, revision=1, seeds/reset the six
profiles, dispatches one RefreshProfile job per profile onto the refresh
queue, drains the queue with queue:work --stop-when-empty, then reports.
No artificial delays — the whole run finishes in well under a second
locally, since nothing here retries or backs off yet.
Correction (post-review). The first version of this table reported "attempts per successful refresh" as a ratio of two row counts (profiles-attempted ÷ profiles-succeeded). Since succeeded is always a subset of attempted, that ratio could structurally never exceed 1.0, no matter how much retry amplification actually happened — it silently couldn't have shown a problem even where one existed. "Age of oldest waiting job" read
DB::table('jobs'), whichQUEUE_CONNECTION=redisnever writes to, so it was permanently "0s (queue empty)" regardless of real queue depth. Both are now real measurements: attempts/accepted are genuine Redis counters incremented once per upstream request (seeRefreshProfile::recordWorkloadMetric()), and oldest-waiting-job reads the actualqueues:refreshRedis list (RunWorkload::oldestWaitingJobAge()). The numbers below are from re-running both workloads for real against the actual code at each point (the broken handler checked out from its step 2 commit, not estimated) after that fix.
Before (the actual step 2 broken handler, checked out and run for real):
| Metric | Value |
|---|---|
| Successful refreshes | 6 / 6 |
| Attempts per successful refresh | n/a (0 attempts / 0 accepted) |
| Age of oldest waiting job | 0s (queue empty) |
| Stored data | all six profiles: likes=0, revision=null |
This is a stronger finding than the original table showed. The broken
handler doesn't just lie about success — it never calls into anything that
would let the attempts/accepted counters move at all (no logAttempt(),
no Outcome, nothing). It isn't instrumented enough to even report a
retry ratio, correct or not. "Successful refreshes: 6/6" here comes from a
separate, row-based check (last_succeeded_at set since dispatch), which
the broken handler sets unconditionally regardless of outcome — that part
of the story is unchanged from before this fix.
After (php artisan workload:run --after, against the step 4+5 fix):
| Metric | Value |
|---|---|
| Successful refreshes | 6 / 6 |
| Attempts per successful refresh | 1.0 (6 attempts / 6 accepted) |
| Age of oldest waiting job | 0s (queue empty) |
| Stored data | all six profiles: real, nonzero likes; revision=1 |
This particular workload run still never exercises a 429, a 5xx, or a
stale revision (the fake upstream is left at mode=ok throughout), so
1.0 is the genuinely correct answer here, not a structural ceiling — see
tests/Feature/RunWorkloadTest.php's "attempts per accepted reflects
real retry amplification" test for a case (one rate-limited attempt, then
one accepted) where the same counters correctly report 2.0, which the
old row-count formula could never have shown regardless of the underlying
behaviour.
The successful-refreshes and oldest-waiting-job metrics are still
identical before and after — and that remains the real point, not an
oversight. A dashboard watching only "successful refreshes" would have
shown the exact same "healthy" number on both the broken and the fixed
handler. The only thing that changed there is the stored data check —
likes going from a uniform 0 to real per-profile values, and revision
going from null to a real value — which is exactly why SPEC.md requires
that check as a mandatory part of the workload's output rather than an
optional extra. This is worth stating plainly: a job that "succeeds" 100%
of the time by its own bookkeeping was, in fact, silently corrupting every
row it touched. Grading the fix by success counts alone would have missed
it entirely — and, as this correction shows, grading it by a naively
computed "attempts per success" would also have missed it, since that
metric was mathematically incapable of showing anything else.
Retry classification (App\Jobs\RefreshProfile::handle), four distinct
behaviours per SPEC.md section 7:
| Outcome | Behaviour |
|---|---|
rate_limited (429) |
$this->release($delay) with randomized backoff (base 5s, jitter ±3s, doubling per 429 specifically seen — tracked in its own counter, not attempts(); see below). Never throws. |
upstream_error (5xx) / timeout |
Throws. Bounded by $maxExceptions (5), not $tries — see below for why. |
unparseable_response |
Same as above — a body that won't parse could be transient (proxy hiccup, reset mid-read), so it gets the same bounded retry. |
invalid_payload |
$this->fail(...) immediately. A well-formed-but-wrong-shape payload is a contract violation; retrying just burns quota. |
Correction (post-review). This job used to define
$tries = 5with a comment claiming "429 releases don't consume these." That was false — Laravel'sattempts()counts every reservation, released or not, and the worker fails a job onceattempts() >= $triesregardless of why it was reserved again. A healthy account waiting its turn behindAccountThrottle(which also callsrelease(1)on a miss) could exhaust$triespurely by waiting, never having actually failed once. Fixed by replacing$trieswithretryUntil(): DateTimeInterface(10 minutes from first dispatch — Laravel calls this once at dispatch and bakes the timestamp into the job payload, so it doesn't reset on every release). Once a job definesretryUntil(), Laravel ignores$tries/maxTries()for the reservation-count check entirely — the whole job, releases included, is now bounded by wall-clock time instead. Genuine thrown failures still get their own independent bound via$maxExceptions(raised from 3 to 5, to match SPEC.md's "bounded by tries" language, now enforced through this instead): Laravel tracks exceptions in a separate per-job-uuid counter regardless ofretryUntil()(Worker::markJobAsFailedIfWillExceedMaxExceptions()), so this bound is untouched by however many times the job was released.rateLimitDelay()'s backoff calculation had the same bug — it readattempts(), so a mix of 429s and throttle misses would jump the backoff curve unpredictably. Now tracked as its own counter, keyed by the underlying queue job's uuid (stable across the release/re-reserve cycle, since a freshRefreshProfilePHP object is constructed on every attempt). Seetests/Feature/RefreshProfileRetryTest.php.Separately, noticed while fixing this: the table above previously also claimed the 5xx/timeout/unparseable retries get "a fixed backoff schedule (
[5, 10, 20, 40])". Nobackoff()method actually exists on this job, andconfig/horizon.phpdoesn't set one either — genuine failures currently retry with no delay at all between attempts. Corrected the claim rather than the behaviour; adding a realbackoff()is out of scope for this fix and is now tracked honestly instead of silently misdescribed.
Every outcome except accepted and rejected_stale also records a failure
(last_failure_at, last_failure_reason, consecutive_failures + 1) —
exactly once per attempt, in handle() itself, never again in failed()
(see "counting discipline" below). rejected_stale is deliberately not a
failure: it only touches last_attempted_at.
Account isolation (App\Jobs\Middleware\AccountThrottle): each job
also carries Redis::funnel("account:{$accountId}")->limit(3), so at most
3 of one account's jobs can be running at once, independent of retries.
A job that can't get the lock is released (not failed) — a full account
isn't a failure, and (as of the fix 2 correction above) a release no
longer risks exhausting the job's retry budget either. The account id is
derived from the username's acct-x-n convention used by the workload
command; there's no real accounts table (see "Remaining limits" below).
The alternative mentioned in SETUP.md — a dedicated queue per noisy
account instead of a shared queue with a per-account throttle — is
equally valid; being able to compare the two is worth more than declaring
one "correct".
Correction (post-review). This used
Redis::throttle(...)->allow(3) ->every(1)— a rate limiter (Illuminate\Redis\Limiters\ DurationLimiter): at most 3 acquisitions per 1-second window. That is not the same guarantee as a concurrency cap. A burst of long-running jobs could each acquire a slot in a different 1-second window and all end up running at once, well past 3 — the mechanism bounded throughput, not how many could be active simultaneously, which is what "one account's burst can't occupy every worker slot" actually requires. Switched toRedis::funnel(...)->limit(3)(Illuminate\Redis\Limiters\ConcurrencyLimiter), which holds a slot for the duration of the callback and only releases it when the job finishes — a real concurrency cap. Seetests/Feature/AccountThrottleTest.php, which manually occupies all 3 slots (the same way the limiter itself would) and confirms a 4th holder is rejected until one frees up.
Demo — php artisan workload:run --isolation. This used to be a
manual-only procedure (see the correction below); it's now a real command
that dispatches a burst for acct-a against a rate-limited fake upstream
while acct-b gets clean responses, then clears the limit and drains the
recovery. Actual captured output from a real run:
=== workload:run --isolation ===
Burst account (acct-a): 6 profiles, rate-limited
Normal account (acct-b): 3 profiles, clean
--- Phase 1 — acct-a rate-limited, acct-b clean ---
acct-a successful refreshes: 0 / 6
acct-b successful refreshes: 3 / 3
Attempts per successful refresh: 3 (9 attempts / 3 accepted)
Age of oldest waiting job: 0s (queue empty)
...waiting on 5 delayed job(s)
--- Phase 2 — acct-a cleared, draining recovery ---
acct-a successful refreshes: 6 / 6
acct-b successful refreshes: 0 / 3
Attempts per successful refresh: n/a (0 attempts / 0 accepted)
Age of oldest waiting job: 0s (queue empty)
Phase 1 is the isolation claim itself, with real numbers: acct-b hits
3/3 while acct-a is entirely rate-limited (0/6) — not starved by A's
trouble. It's also visible in the attempts/accepted ratio: 3.0, not
1.0 — 6 failed attempts from A plus 3 successful ones from B, over 3
actual successes. Phase 2 is the recovery claim: once A's rate limit
clears, all 6 of its profiles succeed (the "...waiting on 5 delayed
job(s)" line is RunWorkload::drainIncludingDelayed() polling — A's
releases carry a real backoff delay, so they aren't instantly ready the
moment the limit is lifted). acct-b shows 0/3 in phase 2 because phase 2
only re-dispatches nothing for B — it was already done in phase 1 and
isn't touched again.
Correction (post-review, optional item). This was previously "manual, not automated" because the fake-upstream route's
modecache key was global — there was no way to 429 one account while serving another cleanly. Added a per-username override (fake_upstream:mode:{username}, checked before the global default —routes/web.php) specifically so this demo could be real instead of asserted.workload:run --isolationis not covered by an automated Pest test — it composes mechanisms (AccountThrottle's concurrency cap, the 429 release/backoff path) that already have their own fast, deterministic tests, and the full demo's Redis backoff delays make an end-to-end version genuinely slow (the real run above took roughly the length of the phase 1 attempts' backoff schedule). Recorded a real run here instead of relying on a slow test or an unverified claim; see AI.md.
The timeout relationship (SPEC.md section 9), wired to real config,
job < worker < retry_after:
| Value | Where | Setting |
|---|---|---|
| 30s | RefreshProfile::$timeout |
job gives up |
| 45s | config/horizon.php → supervisor-refresh.timeout |
worker kills the job |
| 90s | config/queue.php → connections.redis.retry_after (REDIS_QUEUE_RETRY_AFTER) |
Redis makes the job visible again |
If retry_after fires while a job is still running, Redis hands the same
job to a second worker — duplicate execution. WithoutOverlapping (keyed
by username) and the conditional UPDATE are the second and third layers
of defence against exactly that.
Correction (post-review).
WithoutOverlappingwas constructed with no expiry, so its lock was released only inside its ownhandle()'sfinallyblock — meaning only when the job actually finished or failed. A worker killed mid-job (the scenario this timeout chain exists for) never reaches thatfinally, so the lock was held forever and that profile became permanently unrefreshable — the exact opposite of the second layer of defence it was meant to be. Fixed with->expireAfter(60)->releaseAfter(5)inRefreshProfile::middleware(): 60s sits above both the job's own 30s timeout and Horizon's 45s worker timeout (so the lock outlives a job that's still legitimately running) and below Redis's 90sretry_after(so the lock is gone before a second worker could even see the job as visible again);releaseAftermeans a job that finds the lock held is released after 5s rather than spinning. Seetests/Feature/WithoutOverlappingExpiryTest.php, which holds a lock the way a dead worker would and confirms the profile becomes refreshable again once it expires.
Counting discipline (SPEC.md section 13, decided once, here):
consecutive_failuresincrements in exactly one place —RefreshProfile::recordFailure(), called once per attempt that consumed an upstream request.failed()is a safety net for unexpected exceptions only; it never increments.- An attempt is any outcome that consumed an upstream request — a released
429 counts. A job that never left the queue (blocked on
WithoutOverlappingor the account throttle) does not. - A successful refresh is an
acceptedoutcome only — not a completed queue job, and notrejected_stale.
Test 6 (duplicate execution applies the revision once) dispatches the
same job twice in-process against the same fixture and asserts one profile
row and one applied revision. What it proves: the conditional UPDATE is
idempotent under replay — running the exact same accepted write twice
affects the row once, then zero times. What it does not prove: it says
nothing about Redis visibility timeouts, network partitions, or Horizon's
reaper under real concurrent load — those require two workers genuinely
racing each other, which SETUP.md explicitly steers away from ("rather than
trying to spawn real parallel workers"). The guarantee that actually
prevents concurrent double-application is architectural (the conditional
WHERE revision < ? has no read-then-write window), not something this
test demonstrates by itself.
- No accounts table.
profileshas noaccount_idcolumn; the per-account throttle and structured logs derive an account id by splitting the username on its last-segment (acct-a-1→acct-a). That only works because the workload command's usernames follow that convention — a real username wouldn't. The real fix is what SPEC.md's "Identity" note already calls out: promote a numeric upstream id to the actual unique key and add a proper accounts relationship, not parse it out of a string. - Username as identity is still the unique key, for the same reason: the exercise's data only has usernames, and usernames are mutable on creator platforms. A rename today produces a second row with the old one stuck stale forever with no signal. Noted, not implemented.
- The account-isolation demo is manual, not automated (README section
5) — the shared fake-upstream route has one global
mode, not a per-account one, so there's no way to make it 429 a single account while serving another cleanly in an automated test. timeout(connection-level) is unverified.UpstreamClientcatchesConnectionExceptionand classifies it asOutcome::Timeout, and theslowmode on the fake-upstream route exists specifically to trigger it, but no test or manual run has actually exercised a real timeout against a liveUPSTREAM_TIMEOUT—Http::fake()doesn't simulate a hung connection, and doing this for real means deliberately blocking a worker for 10+ seconds.- No real concurrent-worker race. The duplicate-execution guarantee
(README section 6) is only exercised by calling the job twice in one
PHP process — by design, per SETUP.md — not by two workers genuinely
racing on the same row. The conditional
UPDATE's guarantee is architectural (no read-then-write window), not something a test in this repo demonstrates directly. - Numeric values sent as JSON strings are rejected.
ProfileResponsetreats"likes": "120000"(a quoted number) the same as"many"—invalid_payload, per SPEC.md's explicit "non-numeric → invalid" rule. Real upstreams sometimes serialize numbers as strings; if that turns out to be true here, this is a one-line change (accept numeric strings) but it's a real behavioural decision, not an oversight, so it's called out rather than silently handled. - Scout is wired but unexercised.
config/scout.phpis published andProfileisSearchable, per the brief, but nothing in this build actually issues a search query or verifies the database-driver index behaves as expected under a rename/update. - predis, not phpredis, per SETUP.md's explicit setup-simplicity tradeoff — restated here since it's a real production concern, not just a setup note: phpredis is faster and lower-overhead and is what should run in production.
- Out of scope entirely, per SPEC.md: dashboard, public API, auth, search UI, deployment.
What to measure before scaling this beyond a laptop demo: peak arrival
rate of due profiles, job duration distribution, actual worker
concurrency achieved vs. configured, retry amplification (attempts per
success, per account), Postgres write latency on profiles, Redis
memory/CPU and queue latency, and — critically — the real per-account rate
limits each upstream actually enforces, plus which accounts are largest by
refresh volume.
Likely bottleneck order, and what would confirm each:
- Upstream per-account rate limits, first. This is the constraint the
whole exercise is built around. Evidence:
rate_limitedoutcomes concentrated on a small number of large accounts inrefresh.log(jq 'select(.outcome=="rate_limited")' | group by account_id), rising in step with those accounts' refresh volume rather than with overall system load. Fix is external (negotiate quota) or architectural (lower refresh cadence or a dedicated queue for known-large accounts, per the alternative already discussed in section 5). - A single Redis broker, second. Evidence: queue latency (the
workload's "age of oldest waiting job" metric, generalized to
production) climbing across every account at once, not just the
large ones, as total job volume grows — that's a shared-resource
signal, not an account-specific one. Also: Redis CPU/memory approaching
limits, or Horizon's own
waitsthreshold (config/horizon.php) firingLongWaitDetected. Fix: shard by queue/connection, or move to a managed Redis cluster. - Hot-row write contention on the largest accounts, third. Every
refresh of the same profile serializes through one row's conditional
UPDATE. Evidence: elevatedduration_msinrefresh.logspecifically for high-volume profiles'acceptedoutcomes, or Postgres lock-wait metrics concentrated on those specific rows. Only becomes the bottleneck once 1 and 2 are no longer masking it. Fix at that point is architectural (partitioning, or accepting slightly stale reads elsewhere in the system rather than serializing every write).
First 15 minutes after deploy. No schema change is required — the fix
is entirely in App\Jobs\RefreshProfile, App\Upstream\*, and
App\Actions\ApplyProfileUpdate, on top of the existing profiles table.
Deploy behind the existing Horizon supervisors, then watch two things live:
tail -f storage/logs/refresh-*.log | jq for the outcome distribution
(expect to start seeing real invalid_payload/unparseable_response
rates that the broken handler was silently converting into fake
successes), and the Horizon dashboard for queue depth, failed jobs, and
per-supervisor throughput.
Rollout. This is a bug fix to existing behaviour, not a new feature — there's no natural feature flag boundary to canary behind. Ship it in a low-traffic window given the account throttle changes worker scheduling behaviour for every account simultaneously, and watch the account-isolation signal (section 5) specifically for the first large burst after deploy.
Rollback trigger. Any of: invalid_payload spiking across many
profiles at once rather than concentrated on one bad account (section 2's
schema-drift-vs-bad-account distinction — that pattern means something
about the upstream's shape changed, not that this fix is wrong, but it's
still a "stop and look" signal); consecutive_failures climbing broadly;
Horizon workers crash-looping; or duration_ms on accepted writes
spiking (conditional-UPDATE contention worse than expected).
Verifying recovery. Not by watching "successful refreshes" alone —
section 4 is the whole argument for why that metric lies. Recovery means
re-running the same stored-data check the workload command already does:
per-account, confirm likes/revision match real current values (not
just that a job reported success), consecutive_failures back to 0, and
last_succeeded_at recent for profiles that were previously stuck.
Built end-to-end with Claude Code across one continuous working session,
following SPEC.md's build order commit-by-commit (visible in git log).
Not tracked against a wall clock in a way that produces a meaningful hour
figure — the honest breakdown is by step: scaffolding and toolchain setup
(no PHP on the host, so a Docker image had to be built first) took
proportionally the most real time; the broken handler, the fix, and queue
behaviour were each a single focused pass; the before/after workload runs
were quick once the command existed. See AI.md for the specific
decisions, dead ends, and things caught along the way.