mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-27 23:21:53 +02:00
* fix: acknowledge seeded plans before invoking review skills * fix: distinguish current plan input from conversation history * fix: keep hermetic plan reviews on manual permissions * fix: distinguish tool discovery from file permission ownership * fix: preserve initial plan mode in observation tests * fix: wait for scope decisions before writing review findings * fix: carry autoplan decisions consistently into review artifacts * test: retain native failure context in periodic assertions * fix: advance active file permissions before queued questions * fix: finish red-team attempts before retry and cleanup * fix: finalize plan format captures and judges before retry * fix: cancel setup-gbrain SDK attempts before fixture cleanup * test: select periodic consumers of the bounded attempt helper * fix native Bash permission cards and queued questions * fix: preserve independent decisions and review scope Keep CEO approach, engineering scope and outside-review choices from approving independent remedies together. Carry declared contracts through DX polish and resolve new gaps before editing the plan. Regenerate every host and retain existing stop boundaries. Validation: 654 focused tests passed across nine files; all-host generation passed. Full free and periodic validation pending. Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix: require approval before design plan amendments Align the Design review philosophy and rating recipe with its section protocol: resolve one proposed fix, then apply only that approved decision and retain honest scores for declined fixes. Validation: 469 focused tests passed across four files; all-host generation passed. Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix: observe native question completion before transcript persistence Match owned completion hooks to submitted choices, reject conflicting or late answers, and retain bounded failure evidence. * test: recognize review posture in acknowledged native questions Require the selected mode acknowledgement, a completed follow-up question, and its current decoded display while preserving existing posture assertions. * fix: preserve settled CEO choices and isolate pending remedies Resolve established approach gates with cited authority and keep independent fixes out of unrelated option commitments and plan amendments. * fix: carry approved DX choices through later review steps Choose documentation approaches within the accepted scope and map resolved confusion points without reopening them through a bulk menu. * test: handle native settings-file edit prompts Keep one-time owned-file approvals and retain the actual sampled Autoplan permission frame with its matching barrier state. * test: accept standard CEO reply directives with tuning footers Recognize the exact trailing preference footer and letter-list directive while preserving current-display and exact acknowledgement checks. * test: scope split reviewers to their generated plan artifacts * test: observe native Bash permissions and invocation results * test: handle owned Bash prompts during mode preference checks * test: preserve synchronous subprocess rejection in Codex fixture * Fix periodic review handoff navigation Recognize review-first and explicit manual-next-step labels while preserving exact action families, manual preference, and ambiguous-menu rejection. Co-authored-by: OpenAI Codex <noreply@openai.com> * Bind pending file permissions to distinct current targets Allow one captured file request to own the complete current dialog while unrelated file work is pending. Preserve same-path ambiguity, exact input ownership, and one-time grant checks. Co-authored-by: OpenAI Codex <noreply@openai.com> * Make paired CEO verification choices genuinely unresolved Start the positive control with proposed manual checks so its unchanged oracle measures two new coverage decisions. Preserve runtime contracts, targets, count bounds, and all assertions. Co-authored-by: OpenAI Codex <noreply@openai.com> * Keep CEO review options and verification within approved scope Audit every offered option for independent add-ons and keep new verification depth pending until accepted. Preserve already requested coverage and trace plan changes to the actual decision. Co-authored-by: OpenAI Codex <noreply@openai.com> * Assemble DX review artifacts before appending the final report Keep early DX evidence above decisions, update artifact sections in place, and append the report using the actual current file suffix. Re-read after deleting an existing report before choosing the append anchor. Co-authored-by: OpenAI Codex <noreply@openai.com> * Keep outside plan reviews exclusive and invocation-owned Follow one preflight-selected backend, terminate failed Codex work before fallback, and allocate extra prompt/output files uniquely. Consume only the current invocation’s completed output. Co-authored-by: OpenAI Codex <noreply@openai.com> * Select periodic completion evaluations for report writer changes Register the shared review resolver for eight missing consumers and regress selection for all nine completion cases without changing their IDs or tiers. Co-authored-by: OpenAI Codex <noreply@openai.com> * Keep permission ambiguity fixtures on the same normalized target Use distinct raw spellings of one target in the four negative fixtures so they exercise the normalized duplicate-owner guard after exact current-file disambiguation. Preserve the existing exception, no-input, diagnostic and cleanup assertions. Co-authored-by: OpenAI Codex <noreply@openai.com> * Clarify preserved contracts in engineering review fixture Co-authored-by: OpenAI Codex <noreply@openai.com> * Recognize the offered DX follow-up handoff Co-authored-by: OpenAI Codex <noreply@openai.com> * Check independent commitments before presenting review options Co-authored-by: OpenAI Codex <noreply@openai.com> * Keep Codex review output and status in one shell invocation Co-authored-by: OpenAI Codex <noreply@openai.com> * Distinguish seeded plans from reports written by a test attempt Co-authored-by: OpenAI Codex <noreply@openai.com> * Recover clipped Autoplan file approvals with bounded viewport resizing Co-authored-by: OpenAI Codex <noreply@openai.com> * Recover clipped Bash approvals before binding the complete command Co-authored-by: OpenAI Codex <noreply@openai.com> * Isolate setup message tests from the shared checkout Run the real installer in a temporary payload with private config, require successful completion, and guard source and binary contents and mtimes. Co-authored-by: OpenAI Codex <noreply@openai.com> * Fix periodic native permission and report completion handling Match the pinned CLI's soft wraps and clipped headings without granting from incomplete frames. Retire completed file requests, retain mode annotations, and ask section captures for a short final acknowledgement after their full report is saved. Co-authored-by: OpenAI Codex <noreply@openai.com> * Preserve review approvals and validate DX comparison artifacts Keep independent remedies and approved amendments explicit. Give the synthetic DX review its existing documentation and validate peer comparison as required analysis alongside four native decisions. Add positive and negative semantic calibrations while preserving review counts, model budgets and prompt size limits. Co-authored-by: OpenAI Codex <noreply@openai.com> * Make the five-finding CEO fixture's application boundary explicit Materialize the request adapter and service composition used by the synthetic payment application. Explicitly declare the revised unregistered-event and mail-telemetry assumptions while preserving uncaught handler errors, the original invoice path and all five unresolved findings. Co-authored-by: OpenAI Codex <noreply@openai.com> * Keep CEO state-path checks scoped to directory preparation Co-authored-by: OpenAI Codex <noreply@openai.com> * Use checked ports and bounded cleanup in pair-agent tests Discover the daemon port from its owned state file, retain startup diagnostics, and await failed-start cleanup. Add occupied-port, early-exit, deadline, and foreign-state regressions while preserving the existing HTTP assertions and hook budgets. Co-authored-by: Codex <noreply@openai.com> * Preserve queued edit identity and recover clipped Bash permissions Distinguish separately queued unfinished edits from mutation of one native tool ID. Keep grants bound to an exact owned request and reject reused IDs, ambiguous inputs, and competing owners. Support the pinned renderer's literal em dash and request a repaint when only the Bash card's top rule is clipped. Grants still require the complete fresh card and an exact native acknowledgment. Validation: 413 integrated parser/event tests passed; private repaint controls and joint source review passed. Full canonical suite and native periodic rerun remain pending. Co-authored-by: Codex <noreply@openai.com> * Keep periodic reviews within their approved contracts and deliverables Carry exact approvals through engineering review, preserve declared contracts when amending CEO plans, and keep prioritization at the requested decision level. Materialize the revised synthetic SDK reference contract while retaining the five original documentation gaps. Accept the observed semicolon in the finite DX handoff menu and register the direct source dependencies used by the engineering cases. Regenerate canonical review documents without changing model budgets, retries, count bands, or native completion assertions. Validation: all-host generation and 275 review, fixture, selection and parity tests passed. Full free-suite and native periodic validation remain pending. Co-authored-by: Codex <noreply@openai.com> * Keep Eng approval cadence and independence guards explicit * Accept ordinary punctuation in manual review handoffs * Recover file permissions alongside queued Bash calls * Carry approved DX work through later review findings * Clarify the synthetic auth internal failure decision * Bound the periodic DX fixture to onboarding changes * Recognize native Design review handoff labels * Hold scope in the integration-choice review fixture * Carry approved Design decisions through review evidence * Capture listener state when feedback reload fails * Exclude workspace caches before checking deprecated flags * Verify Design UI scope against a seeded review plan * Clarify plan review decisions and outside-voice approval flow * Reject setup menus in the Design UI gate * docs: require focused repair validation before final acceptance * fix: separate review commitments within existing prompt budgets * docs: align generation and contributor validation guidance * fix: advance native review prompts and count acknowledged findings * chore: bump version and changelog (v1.87.1.0) Co-Authored-By: OpenAI Codex <noreply@openai.com> * chore: enforce cheap checks and side-effect-free validation previews * fix: handle owned Fetch permissions and oversized native cards * test: ground review fixtures in independent executable contracts * fix: preserve review decisions and verify reports before completion * test: construct the synthetic credential URL without a scanner false positive * test: materialize DX examples and verify their actual local behavior * fix: clarify CEO review decisions and execution order * fix: clarify review workflow ordering and select Design quality checks * Fix review decision gates and incomplete evaluation fixtures Persist CEO and engineering commitment ledgers before menus, preserve exact approvals, and distinguish implementation structure from feature scope. Route Autoplan through the canonical CEO Step 0 ordering. Classify DX findings before requesting approval and ground runtime claims in actual evidence. Complete neutral non-target fixture contracts and accept the captured Design handoff purpose without relaxing its ownership or acknowledgment checks. Record runtime-capability verification in AGENTS.md validation discipline. Validation: 1,335 focused tests passed across 21 files; build, all-host freshness, skill validation (647 artifacts / 107 tracked), and credential checks passed. Prior paid failures are preserved; behavioral acceptance remains pending. * Fix review decision boundaries and owned Read prompts Preserve exact approvals across review options, compare consistent DX milestones, and keep proposed implementation separate from review evidence. Bind modern Read prompts to one immutable native request and wait for its result. Retain captured regression verdicts, correct fixture error names, improve import probe diagnostics, and record focused-first validation discipline in AGENTS.md. * Clarify CEO and engineering review decisions Use explicit decision steps, one engineering ledger, and clear scope/write transitions. Preserve exact approvals and distinguish pending test requirements. Keep unrelated generated content unchanged. * Fix review decision ordering and native evaluation interactions * Clarify engineering decisions and test artifact order * Clarify pending choices and approvals in CEO reviews * Make CEO review phases sequential and clarify completion * Fix Design board submission intent matching * Seed an existing browser test baseline for Autoplan * Document decision-log payloads before state initialization * Preserve exact review scope and decide one change before drafting options * Require input identity before repeating passing model judges * Honor permitted storage throughout CEO review completion * Match complete native permission text within the pinned renderer contract * Align review approvals, independent choices, and bounded validation * fix: preserve reopened approvals and declare fixture interfaces * fix: isolate review artifacts and audit complete questions * fix: match detector artifact permissions to configured storage * fix: complete native permissions and review fixture workflows * fix: order CEO review work and separate engineering guarantees * fix: preserve native validation and separate review choices * fix: clarify review decisions and judge complete report context * fix: constrain review judgments and retain parse failures * fix: compare each affected value before review decisions * fix: make engineering review decisions and completion order explicit * fix: give the complete Autoplan evaluation a bounded chain budget * fix(cso): diagnose forbidden Docker endpoints before tool lookup * fix(reviews): reconcile workflow contracts and generated artifacts after main integration * fix(evals): migrate retained regressions to the native review harness * fix(tests): close native harness and workflow integration regressions * fix(evals): preserve complete permission context and native menu contracts * fix(tests): capture synchronous command output without pipe drain stalls * fix(reviews): clarify decision and completion ordering * fix(reviews): separate decision readiness from final completion checks * refactor(reviews): consolidate decision rules and completion branches * fix(plan-eng-review): order preparation and clarify decision routing * fix(plan-eng-review): restore size and question-format guard parity * fix(plan-eng-review): clarify scope phases and blocked completion * fix(plan-eng-review): unify review flow and report destination * fix(plan-eng-review): define bootstrap and question stage ownership * fix(plan-eng-review): clarify review structure and design lookup * fix(plan-eng-review): render report examples and show saved decisions * fix: consolidate Eng review decisions and select their evaluations * test: cover overlapping terminal attachments and clean merged runner type * fix: preserve Office Hours relationship closings during review updates * fix: retain pasted review targets across slash invocations * docs: preserve validation traces and correct release scope * test: cover pasted targets in both review skills * fix: validate report artifacts before recording success * fix: redact source roots at CSO report boundaries * fix: bind native Design questions before answering * test: select report privacy and native recovery regressions * test: bind rejection predicate in extracted observers * fix: bind complete boxed native questions * test: keep the Design UI fixture on native review * fix: preserve review decisions and evaluation completion outcomes * fix: clarify CEO approval and report completion order * fix: align native review evaluation ownership and completion * fix: bind review evaluators to native decisions and owned artifacts * fix: validate review decisions against native outcomes * fix: preserve review evidence and Autoplan phase handoffs * test: bind review evidence to owned decisions and completion * fix: retain owned native history across compaction * fix(evals): validate current review decisions and setup choices * fix: bind Autoplan reviews and phase completion to current amended input * fix: reconcile native review evidence and close Autoplan phases * test: recognize owned whole-candidate complexity decisions * test: preserve report freshness for approved investigation handoffs * fix: recognize scoped review findings and isolate dual voice fixtures * fix: make review handoffs and question dispatch self-contained * test: recognize complete CEO decisions and procedural pauses * fix: bind current CEO comparison options and risk intervals * test: bind engineering decisions and completion to owned evidence * fix: publish Autoplan phase reports before continuing tools * test: verify actual Autoplan dual-review dispatch evidence * test: select dual review when shared evidence fixtures change * fix: clarify plan review decisions and completion gates * fix: make CEO review decisions and return paths explicit * test: keep Autoplan prompt files inside attempt state * test: preserve source whitespace across permission dialog wraps * fix: publish Autoplan phase reports before continuing * test: recognize current CEO comparisons and reject inactive records * fix: reconcile engineering decision states before completion * test: recognize complete Design decisions and reports * test: verify current engineering decisions before navigation * Recognize source-owned component reduction choices * fix: recognize current CEO ledger and commitment grids * test: supply RequestPolicy context to Eng count fixture * fix: save complete engineering decisions before asking * fix: bind Autoplan publication to the complete phase readback * chore: prepare 1.87.5.0 reliability release * fix: clarify engineering review completion and preserve log failures * fix: bind CEO saved choices and current section ancestry * fix(evals): bind review execution and completion evidence * fix(plan-ceo-review): verify complete decisions before asking * fix(evals): preserve complete engineering choice records * fix(evals): preserve complete review outcomes and bounded fixtures * fix(autoplan): publish phase reports before advancing * fix(plan-ceo-review): validate option fields before asking * fix(plan-eng-review): verify current decisions after answers * fix(evals): bind review decisions and bound fixture scope * fix(plan-ceo-review): verify decision rows and edit saved checkpoints * fix(evals): bind review evidence and scope document lookup * fix(plan-eng-review): update resolution state with its answer * fix(reviews): preserve complete questions through dispatch * fix(evals): recognize completed mode declarations * fix(evals): define cache consistency at wrapper completion * fix(evals): validate owned initial scope and completed review handoffs * fix: assemble complete CEO decision fields before saving * fix: authenticate automatic mode decisions without guessing selectors * fix: bind engineering coverage to approved regression contracts * fix(evals): supply review helpers to native Eng capture * fix(plan-eng-review): preserve the full selected option scope * fix(evals): recognize owned engineering seed and regression evidence * fix(evals): bind engineering retry reports to native approvals * docs: clarify release guarantees (v1.87.5.0) Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix(evals): recognize owned engineering decisions and handoffs * fix(evals): bind engineering decisions and completion evidence * fix(tests): align review contracts and selection fixtures * fix(skills): restore review prompt size limits * fix(plan-eng-review): clarify review execution and completion * fix(evals): preserve configured retries through all supervision layers * Clarify Engineering decisions and report completion * Keep native decision assertions within their source boundary * fix: recognize owned engineering decisions and completed navigation * fix: bind completed auto decisions to their current review * fix: recognize explicit CEO source attribution * fix: dispatch verified CEO decisions without recomposing fields * test: expose existing execution deadlines to review actors * fix: distinguish CEO decision records from incidental headings * test: bind split-scope choices to the registered native actor * test: connect reviewed regressions to required evaluation coverage * Clarify CEO decision routing and completion stages * test: expose existing section review deadlines to fixture actors * test: recognize complete native CEO pacing inventories * test: exclude answered history from current CEO payloads * test: detect phase entry through owned skill HOME aliases * test: validate native review completion and owned report permissions * fix: make Autoplan close packets carry the parent handoff steps * test: assess source-bound HOLD decisions within the existing deadline * fix: keep CEO native decision fields under one formatting authority * test: register integrated review and permission dependencies * test: align native review adapters and finding coverage Preserve explicit AUTO decisions, apply native single-select defaults, and bind complete cropped questions and report permissions to their owned requests. Require seeded review findings instead of crediting setup menus. Keep captured failure controls and additive selection dependencies. The integrated candidate passed 3,099 focused tests across 65 files; affected paid validation remains required before publication. * fix(autoplan): require phase reports before advancing * fix(evals): bind setup and evidence to complete attempts * fix(evals): bind native answers and pending writes to fixture scope Preserve complete option rows when native descriptions wrap, retain current owned Write arguments before journal publication, and keep engineering and DX answers within their declared fixture interfaces. Add captured free regressions without increasing model budgets or relaxing completion checks. * fix(autoplan): verify phase reports across native tool paths Guard owned methodology reads and reviewer dispatches, detect complete driver loads through Bash, and distinguish report-only edits from implementation changes. Follow authenticated native UUID ancestry when journal writes arrive out of order and verify earlier native content for cached phase reads. Keep current close acknowledgment and parent publication in order, require CEO entry before later phases, and register captured failure regressions. * fix(evals): honor native input and collection lifecycles Match complete native Edit panes and truncated question borders, reject stderr close before EOF, and stop the CEO split fixture once its acknowledged scope decisions are collected. Keep semantic validation, process failures, report requirements, and absolute deadlines authoritative. Add captured-event and real-process regressions with selection dependencies. Focused checks pass; final integrated paid and full-suite acceptance remain pending. * fix(autoplan): retain native session ownership across directory changes Recover missed native UUID ancestry through the existing strict graph while preserving ordinary event order and legacy scoping. Bind publication hooks to Claude's original project directory while retaining current cwd for requested file paths. Captured public-event regressions, existing caller checks, and a pinned native CLI loopback verify both fixes. Preserve failed attempts and require fresh paid and final full-suite acceptance. * docs: align evaluation limits and completion version * fix(autoplan): allow authenticated phase reads during journal streaming * fix(evals): bind clipped native questions and owned edit dialogs * fix: preserve overlay retries and bounded cleanup * fix: recognize owned planning preludes in native questions * docs: explain overlay scheduling and cleanup guarantees * fix: require fresh publication after Autoplan phase reruns * Release gstack 1.87.6 * fix: preserve CI paths, process identity, and test deadlines * fix: keep informational setup commands independent of install probes * fix: clarify plan review decisions and bound source audit reports * Fix remaining Windows identity and native path CI failures * Clarify CEO review decision and reviewer-result routing * test: accept no-install planner in retry supervision * fix(ceo-review): make review decisions and report completion explicit * perf(test): add fast PR gates, input-keyed judge reuse and isolated free shards * fix(test): start isolated CEO smoke from its existing project plan * fix(test): repair CI fixture races and preserve retry evidence * fix(ceo-review): clarify approvals, depth and saved completion --------- Co-authored-by: OpenAI Codex <noreply@openai.com>
252 lines
60 KiB
JSON
252 lines
60 KiB
JSON
{
|
|
"source": "67147822f55b911c033617f759dc472d0d348e72",
|
|
"provenance": {
|
|
"calls": "Exact native public questions, options and acknowledgments from ongoing attempt. No reasoning/signature content.",
|
|
"preAskPlan": "Exact successful Write input at12:33:49.764Z before D4; success12:33:51.480Z. Not synthetic.",
|
|
"currentSavedPlan": "Actual report bytes read at 2026-09-15T12-36-42.857Z; includes decisions answered by this point, not earlier file proof.",
|
|
"publicProjectionPath": "/home/vercel-sandbox/gstack/.context/sep15-ship-consolidation/eng-67147822-monitor/skill-e2e-plan-eng-multi-finding-batching/plan-eng-review-1789475406894-uIGNkU/2026-09-15T12-36-42.857Z/public-events.json",
|
|
"publicProjectionSha256": "fe38a89fb2f396ac2c4bffd1f2678c15b19920bc0c671650e122a227c33729b7",
|
|
"currentSavedPlanSha256": "1d33ed3aa09de491b3b4fb881aedf3ead0556b26c6edc3416d75b298e3a4c34f"
|
|
},
|
|
"call": {
|
|
"sessionId": "bcd8b1ed-2df1-4b34-8ef2-3d5e95f8868d",
|
|
"toolUseId": "toolu_01TGWGFnLMzvtiYHx82R2GXX",
|
|
"questions": [
|
|
{
|
|
"question": "D4 \u2014 Library retry hooks or a custom inline scheduler?\nProject/branch/task: main branch, PLAN.md 'Add background job retry framework'.\nELI10: The job library already knows how to re-run a failed job later; it just asks you 'how long should I wait?' via a hook. The plan skips that and writes its own wait-and-rerun loop inside each of the five workers. You can get the exact same custom curve by answering the library's question with your own function. Writing your own loop means you also own attempt counting, persistence across worker restarts, and every edge case the library already fixed.\nStakes if we pick wrong: A homegrown scheduler that loses retry state on worker restart or double-fires after a crash is a production incident that the library path cannot have.\nRecommendation: A because it gives the same curve control (the plan's stated reason) with one function instead of five schedulers, and it inherits the library's crash and restart semantics. [Layer 1]\nNote: options differ in kind, not coverage \u2014 no completeness score.\nNet: one function on a proven hook vs. five hand-rolled schedulers you must keep correct under crashes.",
|
|
"header": "Scheduler",
|
|
"multiSelect": false,
|
|
"options": [
|
|
{
|
|
"label": "Library hook + shared backoff fn (recommended)",
|
|
"description": "(human: ~1 day / CC: ~20 min) \u2705 Full curve control through the hook's return value; attempt counting and persistence stay with the library. \u2705 Deletes the need for five inline schedulers; the retry bug surface shrinks to one pure function. \u274c Bounded by what the hook exposes (typically delay, fail-now, retry-now); exotic per-job scheduling needs a workaround."
|
|
},
|
|
{
|
|
"label": "Custom inline scheduler, as planned",
|
|
"description": "(human: ~3 days / CC: ~1 hr, plus ongoing maintenance) \u2705 No dependency on the library's hook contract; any scheduling behavior is possible. \u2705 Zero learning curve for the library's retry options. \u274c You own crash recovery, attempt persistence, and duplicate-fire prevention across restarts, in five places."
|
|
},
|
|
{
|
|
"label": "Probe the library hook API first",
|
|
"description": "(human: ~2 hrs / CC: ~5 min) \u2705 Replaces my web-evidence assumption with the actual hook signature before committing. \u2705 Cheap; no implementation change approved yet. \u274c Delays the architecture call; if the hook supports a custom function (likely), this is a detour."
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"answered": true,
|
|
"failed": false,
|
|
"answers": {
|
|
"D4 \u2014 Library retry hooks or a custom inline scheduler?\nProject/branch/task: main branch, PLAN.md 'Add background job retry framework'.\nELI10: The job library already knows how to re-run a failed job later; it just asks you 'how long should I wait?' via a hook. The plan skips that and writes its own wait-and-rerun loop inside each of the five workers. You can get the exact same custom curve by answering the library's question with your own function. Writing your own loop means you also own attempt counting, persistence across worker restarts, and every edge case the library already fixed.\nStakes if we pick wrong: A homegrown scheduler that loses retry state on worker restart or double-fires after a crash is a production incident that the library path cannot have.\nRecommendation: A because it gives the same curve control (the plan's stated reason) with one function instead of five schedulers, and it inherits the library's crash and restart semantics. [Layer 1]\nNote: options differ in kind, not coverage \u2014 no completeness score.\nNet: one function on a proven hook vs. five hand-rolled schedulers you must keep correct under crashes.": "Library hook + shared backoff fn (recommended)"
|
|
},
|
|
"unansweredQuestionIndices": [],
|
|
"answeredAt": "2026-09-15T12:34:08.932Z"
|
|
},
|
|
"preAskPlan": "# Eng Review: Add background job retry framework\n\nReviewed target: `PLAN.md` (\"Plan: Add background job retry framework\"), repo `gstack-plan-count-mVowtS`, branch `main`, commit `6d4d07b`.\nReview: `/plan-eng-review`, 2026-09-15. Session `1332688-1789475401-070cb1ba`.\n\nEvidence limits: this repo contains only `PLAN.md` and `CLAUDE.md`. The 5 worker files, `processWebhookJob()`, and the job library named in the plan are not present here, so every finding is grounded in plan text (`PLAN.md:line`) and stated as a proposed-work risk, not an observed bug. Confidence is capped accordingly.\n\n## Original plan (unchanged)\n\n# Plan: Add background job retry framework\n\n## Architecture\nWe'll roll a custom exponential-backoff scheduler inline in each worker\nrather than use the existing job library's built-in retry hooks. Same\nshape as the library version, but we want full control over the curve.\n\n## Code quality\nThe retry envelope (compute delay, log attempt, dispatch) is duplicated\nacross 5 worker files with copy-pasted bodies. We will leave the\nduplication for now and refactor \"later.\"\n\n## Tests\nThe existing `processWebhookJob()` flow gets rewritten as part of this\nchange. No regression test for the prior at-most-once delivery guarantee\nis planned.\n\n## Performance\nOn every retry we re-fetch the full job payload from the database, then\niterate the payload to recompute the dependency graph. Could cache the\ngraph on the first attempt; not planned.\n\n## Step 0: Scope Challenge\n\n1. **What already exists:** the job library's built-in retry hooks (`PLAN.md:6-8`) already do scheduling, attempt counting, and delay computation. Mainstream job libraries (BullMQ, Bull, Sidekiq, Oban, Celery) accept a custom backoff function, so \"full control over the curve\" does not require re-implementing the scheduler. **[Layer 1]**\n2. **Minimum change set:** (a) one backoff function passed to the library hook, (b) an explicit delivery-guarantee decision for `processWebhookJob()`, (c) regression tests for that guarantee, (d) retry-state caching for the dependency graph. Everything else in the plan is either duplicated work or a deferred shortcut.\n3. **Complexity check:** 5 worker files touched, 5 copies of a scheduler. Below the 8-file gate, but 5 copies of the same new mechanism is the smell the gate is looking for. No complexity gate question; handled as R1/R2 below.\n4. **Search check** (WebSearch; Aside unavailable): BullMQ documents a custom backoff strategy hook returning delay / 0 / -1 (fail now). AWS Builders' Library and Google Cloud client libraries default to full jitter. Webhook guidance is unanimous: retries make delivery at-least-once, so an idempotency key on the receiver side is mandatory.\n Sources: [BullMQ custom backoff strategy](https://docs.bullmq.io/bull/patterns/custom-backoff-strategy), [AWS: timeouts, retries, and backoff with jitter](https://aws.amazon.com/builders-library/timeouts-retries-and-backoff-with-jitter/), [Hookdeck: webhook idempotency](https://hookdeck.com/webhooks/guides/implement-webhook-idempotency), [Webhook reliability 2026 reference](https://www.digitalapplied.com/blog/webhook-reliability-idempotency-retries-engineering-reference-2026)\n5. **TODOS.md:** none in repo.\n6. **Completeness check:** the plan takes three explicit shortcuts (leave duplication, skip regression test, skip caching). Each costs minutes with CC. Recommend the complete version of all three.\n7. **Distribution check:** no new artifact. N/A.\n\n### Scope Challenge findings\n\n| # | Severity | Conf | Where | Finding | Disposition |\n|---|----------|------|-------|---------|-------------|\n| F1 | P1 | 8/10 | PLAN.md:6-8 | Custom inline scheduler rebuilds what the library's retry hooks provide. `\"rather than use the existing job library's built-in retry hooks\"` \u2014 a custom backoff function on the hook gives the same curve control. Scope reduction opportunity. [Layer 1] | pending \u2192 R1 |\n| F2 | P1 | 9/10 | PLAN.md:16-18 | `\"No regression test for the prior at-most-once delivery guarantee\"` understates it: adding retries to `processWebhookJob()` changes the delivery guarantee from at-most-once to at-least-once. That is a contract change to every webhook receiver, not a test gap. | pending \u2192 R3, R4 |\n| F3 | P2 | 9/10 | PLAN.md:11-13 | `\"duplicated across 5 worker files with copy-pasted bodies\"` \u2014 five copies of compute-delay/log/dispatch means five places for a backoff bug to hide. \"Later\" refactors of retry code rarely happen because the bug that motivates them is a 3am incident. | pending \u2192 R2 |\n| F4 | P2 | 8/10 | PLAN.md:6 | Curve parameters are unspecified: no jitter, no delay cap, no max attempts, no terminal disposition (dead-letter vs drop). Without jitter, a downstream outage makes every failed job retry in lockstep. | pending \u2192 R6, R7, R8 |\n| F5 | P2 | 7/10 | PLAN.md:21-23 | `\"re-fetch the full job payload ... recompute the dependency graph\"` on every retry: retry cost scales with payload size times attempts, and the hot path runs exactly when the system is already unhealthy. | pending \u2192 R5 |\n\nScope disposition: no scope reduction question fired (below complexity gate); scope decisions flow through the ledger.\n\n## Decision ledger\n\n### R1: Where the retry scheduler lives (library hook vs custom inline)\nFinding: F1, P1, confidence 8/10, PLAN.md:6-8, reviewer: plan-eng-review (Claude)\nPlan baseline: custom exponential-backoff scheduler inline in each of 5 workers (original proposal, PLAN.md:6-8)\nRuntime evidence: unknown; the job library and worker files are not in this repo. Web evidence: BullMQ/Bull custom backoff hook accepts a function returning delay ms, 0, or -1.\nState: pending\n\nComparison grid:\n\n| Choice | Current | A | B | C |\n|---|---|---|---|---|\n| R1 scheduler location | custom inline per worker, pending | library retry hook + one shared backoff function | custom inline scheduler per worker (as planned) | undecided; bounded probe of the library hook API first |\n| R2 envelope dedup | 5 copies, pending | pending (mostly moot if A) | pending | pending |\n| R3 webhook delivery contract | at-most-once \u2192 implicit at-least-once, pending | pending | pending | pending |\n| R6 jitter | unspecified, pending | pending | pending | pending |\n| R7 delay cap | unspecified, pending | pending | pending | pending |\n| R8 max attempts / terminal disposition | unspecified, pending | pending | pending | pending |\n\nQuestion D4:\nD4 \u2014 Library retry hooks or a custom inline scheduler?\nProject/branch/task: main branch, PLAN.md \"Add background job retry framework\".\nELI10: The job library already knows how to re-run a failed job later; it just asks you \"how long should I wait?\" via a hook. The plan skips that and writes its own wait-and-rerun loop inside each of the five workers. You can get the exact same custom curve by answering the library's question with your own function. Writing your own loop means you also own attempt counting, persistence across worker restarts, and every edge case the library already fixed.\nStakes if we pick wrong: A homegrown scheduler that loses retry state on worker restart or double-fires after a crash is a production incident that the library path cannot have.\nRecommendation: A because it gives the same curve control (the plan's stated reason) with one function instead of five schedulers, and it inherits the library's crash and restart semantics. [Layer 1]\nNote: options differ in kind, not coverage \u2014 no completeness score.\nA) Library hook + one shared backoff function (recommended) (human: ~1 day / CC: ~20 min)\n \u2705 Full curve control through the hook's return value; attempt counting and persistence stay with the library.\n \u2705 Deletes the need for five inline schedulers; the retry bug surface shrinks to one pure function.\n \u274c You are bounded by what the hook exposes (typically delay, fail-now, or retry-now); exotic per-job scheduling needs a workaround.\nB) Custom inline scheduler per worker, as planned (human: ~3 days / CC: ~1 hr, plus ongoing maintenance)\n \u2705 No dependency on the library's hook contract; any scheduling behavior is possible.\n \u2705 Zero learning curve for the library's retry options.\n \u274c You own crash recovery, attempt persistence, and duplicate-fire prevention across restarts, in five places.\nC) Bounded probe first: read the library's hook API, then decide (human: ~2 hrs / CC: ~5 min)\n \u2705 Replaces my web-evidence assumption with the actual hook signature before committing.\n \u2705 Cheap; no implementation change approved yet.\n \u274c Delays the architecture call; if the hook supports a custom function (likely), this is a detour.\nNet: one function on a proven hook vs. five hand-rolled schedulers you must keep correct under crashes.\n\nActual answer: unanswered\nAccepted scope: none\nHistory: none\n",
|
|
"calls": [
|
|
{
|
|
"sessionId": "bcd8b1ed-2df1-4b34-8ef2-3d5e95f8868d",
|
|
"toolUseId": "toolu_0136QBbi2EXrM3zFnK8Bp8zB",
|
|
"questions": [
|
|
{
|
|
"question": "D1 \u2014 Add gstack skill routing rules to this project's CLAUDE.md?\nProject/branch/task: main branch, plan review fixture for 'Add background job retry framework'.\nELI10: gstack skills (review, ship, investigate, etc.) get invoked automatically when CLAUDE.md tells Claude which request maps to which skill. Without the routing section, you have to type each /skill by hand. This is a one-time setup question per project.\nStakes if we pick wrong: Skipping means manual skill invocation; adding means a small CLAUDE.md append and a commit (which would have to wait until we leave plan mode).\nRecommendation: A because routing rules make the skills fire when they're useful, and it's a two-line revert if you dislike it.\nNote: options differ in kind, not coverage \u2014 no completeness score.\nNet: automatic skill routing vs. keeping CLAUDE.md untouched for this fixture.",
|
|
"header": "Routing",
|
|
"multiSelect": false,
|
|
"options": [
|
|
{
|
|
"label": "Add routing rules (recommended)",
|
|
"description": "\u2705 Skills like /investigate, /review, /ship fire on matching requests without you remembering names. \u2705 Section is appended, nothing existing in CLAUDE.md is changed. \u274c Adds a commit to this repo (deferred until plan mode exits, since edits are locked right now)."
|
|
},
|
|
{
|
|
"label": "No thanks, manual invocation",
|
|
"description": "\u2705 CLAUDE.md and git history stay exactly as they are for this fixture repo. \u2705 You can re-enable later with one gstack-config command. \u274c Every skill has to be typed by hand each time you want it."
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"answered": true,
|
|
"failed": false,
|
|
"answers": {
|
|
"D1 \u2014 Add gstack skill routing rules to this project's CLAUDE.md?\nProject/branch/task: main branch, plan review fixture for 'Add background job retry framework'.\nELI10: gstack skills (review, ship, investigate, etc.) get invoked automatically when CLAUDE.md tells Claude which request maps to which skill. Without the routing section, you have to type each /skill by hand. This is a one-time setup question per project.\nStakes if we pick wrong: Skipping means manual skill invocation; adding means a small CLAUDE.md append and a commit (which would have to wait until we leave plan mode).\nRecommendation: A because routing rules make the skills fire when they're useful, and it's a two-line revert if you dislike it.\nNote: options differ in kind, not coverage \u2014 no completeness score.\nNet: automatic skill routing vs. keeping CLAUDE.md untouched for this fixture.": "Add routing rules (recommended)"
|
|
},
|
|
"unansweredQuestionIndices": [],
|
|
"answeredAt": "2026-09-15T12:30:20.924Z"
|
|
},
|
|
{
|
|
"sessionId": "bcd8b1ed-2df1-4b34-8ef2-3d5e95f8868d",
|
|
"toolUseId": "toolu_017KZU1eqdGxsdeyGqeen7Ue",
|
|
"questions": [
|
|
{
|
|
"question": "D2 \u2014 No design doc found. Run /office-hours first, or go straight to the engineering review?\nProject/branch/task: main branch, reviewing PLAN.md 'Add background job retry framework'.\nELI10: A design doc is a short write-up of the problem, the constraints, and the alternatives you rejected. /office-hours produces one in about 10 minutes and gives this review sharper input: it would force the 'why not the library's retry hooks?' question before we argue about backoff curves. Without it, I review the plan as written and infer the intent.\nStakes if we pick wrong: Skipping risks reviewing the wrong problem framing; running it costs ~10 minutes before any findings land.\nRecommendation: B because the plan is short and its four sections already name their own risks; the review can challenge the premise directly without a separate doc step.\nNote: options differ in kind, not coverage \u2014 no completeness score.\nNet: sharper problem statement up front vs. findings in the next few minutes.",
|
|
"header": "Design doc",
|
|
"multiSelect": false,
|
|
"options": [
|
|
{
|
|
"label": "Skip, standard review (recommended)",
|
|
"description": "\u2705 Findings start now; the plan is 20 lines and its premise can be challenged inline. \u2705 No context switch; we pick up /office-hours later if the architecture call turns out to need it. \u274c Problem statement and constraints stay implicit, so I infer intent from four short paragraphs."
|
|
},
|
|
{
|
|
"label": "Run /office-hours now",
|
|
"description": "\u2705 Produces a structured problem statement plus explored alternatives before we lock architecture. \u2705 Forces the 'library hooks vs custom scheduler' question with the full context on the table. \u274c About 10 minutes of interactive Q&A before the engineering review begins (human: ~1 hr / CC: ~10 min)."
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"answered": true,
|
|
"failed": false,
|
|
"answers": {
|
|
"D2 \u2014 No design doc found. Run /office-hours first, or go straight to the engineering review?\nProject/branch/task: main branch, reviewing PLAN.md 'Add background job retry framework'.\nELI10: A design doc is a short write-up of the problem, the constraints, and the alternatives you rejected. /office-hours produces one in about 10 minutes and gives this review sharper input: it would force the 'why not the library's retry hooks?' question before we argue about backoff curves. Without it, I review the plan as written and infer the intent.\nStakes if we pick wrong: Skipping risks reviewing the wrong problem framing; running it costs ~10 minutes before any findings land.\nRecommendation: B because the plan is short and its four sections already name their own risks; the review can challenge the premise directly without a separate doc step.\nNote: options differ in kind, not coverage \u2014 no completeness score.\nNet: sharper problem statement up front vs. findings in the next few minutes.": "Skip, standard review (recommended)"
|
|
},
|
|
"unansweredQuestionIndices": [],
|
|
"answeredAt": "2026-09-15T12:31:03.000Z"
|
|
},
|
|
{
|
|
"sessionId": "bcd8b1ed-2df1-4b34-8ef2-3d5e95f8868d",
|
|
"toolUseId": "toolu_01MeRxNzDp2UhmeYv2uPq4Dy",
|
|
"questions": [
|
|
{
|
|
"question": "D3 \u2014 Let gstack search learnings from your other projects on this machine?\nProject/branch/task: main branch, reviewing PLAN.md 'Add background job retry framework'.\nELI10: gstack saves small lessons from each session (pitfalls, patterns, commands that worked). Right now it only looks at lessons from this project. It can also pull lessons from your other projects on this machine. Everything stays local; nothing is uploaded.\nStakes if we pick wrong: Enabling on a machine with multiple client codebases could let one client's patterns color advice for another; disabling means a retry-related lesson from a sibling project won't surface here.\nRecommendation: A because this is a solo-style setup with no sign of multi-client separation, and cross-project retry/queue lessons are exactly what this review benefits from.\nNote: options differ in kind, not coverage \u2014 no completeness score.\nNet: broader recall vs. strict per-project isolation.",
|
|
"header": "Learnings",
|
|
"multiSelect": false,
|
|
"options": [
|
|
{
|
|
"label": "Enable cross-project (recommended)",
|
|
"description": "\u2705 Retry, queue and worker lessons learned elsewhere on this machine surface in this review. \u2705 Stays entirely local; one config flag, reversible any time. \u274c Advice can be colored by an unrelated project's conventions if you juggle client codebases."
|
|
},
|
|
{
|
|
"label": "Keep project-scoped only",
|
|
"description": "\u2705 Strict isolation: nothing from another codebase influences this project's reviews. \u2705 Sensible when you work across multiple clients with conflicting conventions. \u274c This project has zero learnings so far, so recall stays empty until sessions accumulate here."
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"answered": true,
|
|
"failed": false,
|
|
"answers": {
|
|
"D3 \u2014 Let gstack search learnings from your other projects on this machine?\nProject/branch/task: main branch, reviewing PLAN.md 'Add background job retry framework'.\nELI10: gstack saves small lessons from each session (pitfalls, patterns, commands that worked). Right now it only looks at lessons from this project. It can also pull lessons from your other projects on this machine. Everything stays local; nothing is uploaded.\nStakes if we pick wrong: Enabling on a machine with multiple client codebases could let one client's patterns color advice for another; disabling means a retry-related lesson from a sibling project won't surface here.\nRecommendation: A because this is a solo-style setup with no sign of multi-client separation, and cross-project retry/queue lessons are exactly what this review benefits from.\nNote: options differ in kind, not coverage \u2014 no completeness score.\nNet: broader recall vs. strict per-project isolation.": "Enable cross-project (recommended)"
|
|
},
|
|
"unansweredQuestionIndices": [],
|
|
"answeredAt": "2026-09-15T12:32:31.182Z"
|
|
},
|
|
{
|
|
"sessionId": "bcd8b1ed-2df1-4b34-8ef2-3d5e95f8868d",
|
|
"toolUseId": "toolu_01TGWGFnLMzvtiYHx82R2GXX",
|
|
"questions": [
|
|
{
|
|
"question": "D4 \u2014 Library retry hooks or a custom inline scheduler?\nProject/branch/task: main branch, PLAN.md 'Add background job retry framework'.\nELI10: The job library already knows how to re-run a failed job later; it just asks you 'how long should I wait?' via a hook. The plan skips that and writes its own wait-and-rerun loop inside each of the five workers. You can get the exact same custom curve by answering the library's question with your own function. Writing your own loop means you also own attempt counting, persistence across worker restarts, and every edge case the library already fixed.\nStakes if we pick wrong: A homegrown scheduler that loses retry state on worker restart or double-fires after a crash is a production incident that the library path cannot have.\nRecommendation: A because it gives the same curve control (the plan's stated reason) with one function instead of five schedulers, and it inherits the library's crash and restart semantics. [Layer 1]\nNote: options differ in kind, not coverage \u2014 no completeness score.\nNet: one function on a proven hook vs. five hand-rolled schedulers you must keep correct under crashes.",
|
|
"header": "Scheduler",
|
|
"multiSelect": false,
|
|
"options": [
|
|
{
|
|
"label": "Library hook + shared backoff fn (recommended)",
|
|
"description": "(human: ~1 day / CC: ~20 min) \u2705 Full curve control through the hook's return value; attempt counting and persistence stay with the library. \u2705 Deletes the need for five inline schedulers; the retry bug surface shrinks to one pure function. \u274c Bounded by what the hook exposes (typically delay, fail-now, retry-now); exotic per-job scheduling needs a workaround."
|
|
},
|
|
{
|
|
"label": "Custom inline scheduler, as planned",
|
|
"description": "(human: ~3 days / CC: ~1 hr, plus ongoing maintenance) \u2705 No dependency on the library's hook contract; any scheduling behavior is possible. \u2705 Zero learning curve for the library's retry options. \u274c You own crash recovery, attempt persistence, and duplicate-fire prevention across restarts, in five places."
|
|
},
|
|
{
|
|
"label": "Probe the library hook API first",
|
|
"description": "(human: ~2 hrs / CC: ~5 min) \u2705 Replaces my web-evidence assumption with the actual hook signature before committing. \u2705 Cheap; no implementation change approved yet. \u274c Delays the architecture call; if the hook supports a custom function (likely), this is a detour."
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"answered": true,
|
|
"failed": false,
|
|
"answers": {
|
|
"D4 \u2014 Library retry hooks or a custom inline scheduler?\nProject/branch/task: main branch, PLAN.md 'Add background job retry framework'.\nELI10: The job library already knows how to re-run a failed job later; it just asks you 'how long should I wait?' via a hook. The plan skips that and writes its own wait-and-rerun loop inside each of the five workers. You can get the exact same custom curve by answering the library's question with your own function. Writing your own loop means you also own attempt counting, persistence across worker restarts, and every edge case the library already fixed.\nStakes if we pick wrong: A homegrown scheduler that loses retry state on worker restart or double-fires after a crash is a production incident that the library path cannot have.\nRecommendation: A because it gives the same curve control (the plan's stated reason) with one function instead of five schedulers, and it inherits the library's crash and restart semantics. [Layer 1]\nNote: options differ in kind, not coverage \u2014 no completeness score.\nNet: one function on a proven hook vs. five hand-rolled schedulers you must keep correct under crashes.": "Library hook + shared backoff fn (recommended)"
|
|
},
|
|
"unansweredQuestionIndices": [],
|
|
"answeredAt": "2026-09-15T12:34:08.932Z"
|
|
},
|
|
{
|
|
"sessionId": "bcd8b1ed-2df1-4b34-8ef2-3d5e95f8868d",
|
|
"toolUseId": "toolu_01MprJAjwzDWjtH6wqWoArXm",
|
|
"questions": [
|
|
{
|
|
"question": "D5 \u2014 Extract one shared retry module now, or keep per-worker copies?\nProject/branch/task: main branch, PLAN.md 'Add background job retry framework'; R1 approved (library hook + shared backoff fn).\nELI10: Even with the library doing the scheduling, each worker still has to hook in, say how to back off, and log each attempt. The plan copies that wiring into all five workers and promises to clean up later. One shared module means a backoff bug gets fixed once; five copies means fixing it five times and hoping you found them all.\nStakes if we pick wrong: A jitter or cap fix lands in four of five workers; the fifth hammers a downstream service in lockstep during the next outage.\nRecommendation: A because with R1 approved the shared module is ~50 lines, and every future curve change lands in one place.\nCompleteness: A=10/10, B=3/10\nNet: one place to be right vs. five places to be wrong.",
|
|
"header": "DRY",
|
|
"multiSelect": false,
|
|
"options": [
|
|
{
|
|
"label": "One shared retry module (recommended)",
|
|
"description": "(human: ~half day / CC: ~10 min) \u2705 Backoff, logging and hook registration live in one file with one test suite. \u2705 Curve decisions become one-line config changes instead of five edits. \u274c Five workers gain an import and a small adapter call; slightly more indirection when reading one worker."
|
|
},
|
|
{
|
|
"label": "Per-worker copies, refactor later",
|
|
"description": "(human: ~0 now, ~1 day later / CC: ~0 now, ~15 min later) \u2705 No cross-worker coupling; each worker is fully self-contained. \u2705 Nothing to design up front. \u274c Five copies drift; 'later' retry refactors rarely happen before the incident that motivates them."
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"answered": true,
|
|
"failed": false,
|
|
"answers": {
|
|
"D5 \u2014 Extract one shared retry module now, or keep per-worker copies?\nProject/branch/task: main branch, PLAN.md 'Add background job retry framework'; R1 approved (library hook + shared backoff fn).\nELI10: Even with the library doing the scheduling, each worker still has to hook in, say how to back off, and log each attempt. The plan copies that wiring into all five workers and promises to clean up later. One shared module means a backoff bug gets fixed once; five copies means fixing it five times and hoping you found them all.\nStakes if we pick wrong: A jitter or cap fix lands in four of five workers; the fifth hammers a downstream service in lockstep during the next outage.\nRecommendation: A because with R1 approved the shared module is ~50 lines, and every future curve change lands in one place.\nCompleteness: A=10/10, B=3/10\nNet: one place to be right vs. five places to be wrong.": "One shared retry module (recommended)"
|
|
},
|
|
"unansweredQuestionIndices": [],
|
|
"answeredAt": "2026-09-15T12:34:46.555Z"
|
|
},
|
|
{
|
|
"sessionId": "bcd8b1ed-2df1-4b34-8ef2-3d5e95f8868d",
|
|
"toolUseId": "toolu_011X2j7TPmV9dNUL3nE5EfJB",
|
|
"questions": [
|
|
{
|
|
"question": "D6 \u2014 What delivery guarantee do webhooks have once retries exist?\nProject/branch/task: main branch, PLAN.md 'Add background job retry framework'; R1, R2 approved.\nELI10: Today a webhook is sent once; if it fails, it's gone (at-most-once). Retrying means a receiver can get the same event twice, e.g. when they processed it but their 200 arrived after our timeout (at-least-once). That is a contract change for every receiver. The standard fix is to send a stable event id with every attempt so receivers can ignore duplicates. Or you keep webhooks out of the retry framework entirely.\nStakes if we pick wrong: Duplicate webhooks with no dedup handle double-charge, double-notify, or double-create on the receiver's side, and they can't tell it's a duplicate.\nRecommendation: A because dropped webhooks are worse than duplicated ones and the idempotency key is what makes duplicates harmless; it is the industry default.\nNote: options differ in kind, not coverage \u2014 no completeness score.\nNet: reliable delivery with a dedup handle vs. preserved lossiness vs. reliable delivery that quietly breaks receivers.",
|
|
"header": "Webhooks",
|
|
"multiSelect": false,
|
|
"options": [
|
|
{
|
|
"label": "At-least-once + idempotency key (recommended)",
|
|
"description": "(human: ~1 day / CC: ~20 min) \u2705 Failed deliveries get retried; receivers dedupe on a stable event id header/field. \u2705 Matches how Stripe, GitHub and Shopify deliver, so receivers already know the pattern. \u274c Public contract change: receivers must be told duplicates are now possible, and the id must be stable across attempts."
|
|
},
|
|
{
|
|
"label": "Keep at-most-once: exclude webhooks",
|
|
"description": "(human: ~1 hr / CC: ~5 min) \u2705 No contract change for receivers; existing guarantee is preserved exactly. \u2705 Smallest change to processWebhookJob(). \u274c Webhooks stay lossy; a receiver blip still drops the event forever."
|
|
},
|
|
{
|
|
"label": "At-least-once, no key (as planned)",
|
|
"description": "(human: ~0 / CC: ~0) \u2705 No extra field or documentation work. \u2705 Webhooks get retried. \u274c Receivers get undetectable duplicates; this is the outcome the web guidance unanimously warns against."
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"answered": true,
|
|
"failed": false,
|
|
"answers": {
|
|
"D6 \u2014 What delivery guarantee do webhooks have once retries exist?\nProject/branch/task: main branch, PLAN.md 'Add background job retry framework'; R1, R2 approved.\nELI10: Today a webhook is sent once; if it fails, it's gone (at-most-once). Retrying means a receiver can get the same event twice, e.g. when they processed it but their 200 arrived after our timeout (at-least-once). That is a contract change for every receiver. The standard fix is to send a stable event id with every attempt so receivers can ignore duplicates. Or you keep webhooks out of the retry framework entirely.\nStakes if we pick wrong: Duplicate webhooks with no dedup handle double-charge, double-notify, or double-create on the receiver's side, and they can't tell it's a duplicate.\nRecommendation: A because dropped webhooks are worse than duplicated ones and the idempotency key is what makes duplicates harmless; it is the industry default.\nNote: options differ in kind, not coverage \u2014 no completeness score.\nNet: reliable delivery with a dedup handle vs. preserved lossiness vs. reliable delivery that quietly breaks receivers.": "At-least-once + idempotency key (recommended)"
|
|
},
|
|
"unansweredQuestionIndices": [],
|
|
"answeredAt": "2026-09-15T12:35:28.200Z"
|
|
},
|
|
{
|
|
"sessionId": "bcd8b1ed-2df1-4b34-8ef2-3d5e95f8868d",
|
|
"toolUseId": "toolu_015NLEjXoGSM5rpPvH9hEgoY",
|
|
"questions": [
|
|
{
|
|
"question": "D7 \u2014 Add jitter to the backoff curve?\nProject/branch/task: main branch, PLAN.md 'Add background job retry framework'; R1-R3 approved.\nELI10: When a downstream service hiccups, thousands of jobs fail in the same second. Pure exponential backoff makes them all retry in the same second too, over and over, which can keep the downstream service down. Jitter randomizes each wait so retries spread out. Full jitter (random between 0 and the computed delay) is what AWS and Google ship by default.\nStakes if we pick wrong: Retries arrive as synchronized waves and prolong the very outage they're recovering from.\nRecommendation: A because it is one random call in the shared backoff function and it is the default in every serious retry library.\nCompleteness: A=10/10, B=5/10\nNet: spread-out retries vs. predictable but synchronized ones.",
|
|
"header": "Jitter",
|
|
"multiSelect": false,
|
|
"options": [
|
|
{
|
|
"label": "Full jitter (recommended)",
|
|
"description": "(human: ~1 hr incl. tests / CC: ~3 min) \u2705 Retry waves spread out; downstream recovery is not re-crushed by synchronized retries. \u2705 One line in the shared module plus a deterministic test using an injected RNG. \u274c Individual retry timing is no longer predictable to the second; tests need a seeded RNG."
|
|
},
|
|
{
|
|
"label": "No jitter, deterministic exponential",
|
|
"description": "(human: ~0 / CC: ~0) \u2705 Exact, predictable retry times; trivial to reason about in logs. \u2705 Nothing extra to test. \u274c Thundering herd on every downstream outage; 'full control over the curve' ends up worse than the library default."
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"answered": true,
|
|
"failed": false,
|
|
"answers": {
|
|
"D7 \u2014 Add jitter to the backoff curve?\nProject/branch/task: main branch, PLAN.md 'Add background job retry framework'; R1-R3 approved.\nELI10: When a downstream service hiccups, thousands of jobs fail in the same second. Pure exponential backoff makes them all retry in the same second too, over and over, which can keep the downstream service down. Jitter randomizes each wait so retries spread out. Full jitter (random between 0 and the computed delay) is what AWS and Google ship by default.\nStakes if we pick wrong: Retries arrive as synchronized waves and prolong the very outage they're recovering from.\nRecommendation: A because it is one random call in the shared backoff function and it is the default in every serious retry library.\nCompleteness: A=10/10, B=5/10\nNet: spread-out retries vs. predictable but synchronized ones.": "Full jitter (recommended)"
|
|
},
|
|
"unansweredQuestionIndices": [],
|
|
"answeredAt": "2026-09-15T12:36:15.855Z"
|
|
}
|
|
],
|
|
"currentSavedPlan": "# Eng Review: Add background job retry framework\n\nReviewed target: `PLAN.md` (\"Plan: Add background job retry framework\"), repo `gstack-plan-count-mVowtS`, branch `main`, commit `6d4d07b`.\nReview: `/plan-eng-review`, 2026-09-15. Session `1332688-1789475401-070cb1ba`.\n\nEvidence limits: this repo contains only `PLAN.md` and `CLAUDE.md`. The 5 worker files, `processWebhookJob()`, and the job library named in the plan are not present here, so every finding is grounded in plan text (`PLAN.md:line`) and stated as a proposed-work risk, not an observed bug. Confidence is capped accordingly.\n\n## Original plan (unchanged)\n\n# Plan: Add background job retry framework\n\n## Architecture\nWe'll roll a custom exponential-backoff scheduler inline in each worker\nrather than use the existing job library's built-in retry hooks. Same\nshape as the library version, but we want full control over the curve.\n\n## Code quality\nThe retry envelope (compute delay, log attempt, dispatch) is duplicated\nacross 5 worker files with copy-pasted bodies. We will leave the\nduplication for now and refactor \"later.\"\n\n## Tests\nThe existing `processWebhookJob()` flow gets rewritten as part of this\nchange. No regression test for the prior at-most-once delivery guarantee\nis planned.\n\n## Performance\nOn every retry we re-fetch the full job payload from the database, then\niterate the payload to recompute the dependency graph. Could cache the\ngraph on the first attempt; not planned.\n\n## Step 0: Scope Challenge\n\n1. **What already exists:** the job library's built-in retry hooks (`PLAN.md:6-8`) already do scheduling, attempt counting, and delay computation. Mainstream job libraries (BullMQ, Bull, Sidekiq, Oban, Celery) accept a custom backoff function, so \"full control over the curve\" does not require re-implementing the scheduler. **[Layer 1]**\n2. **Minimum change set:** (a) one backoff function passed to the library hook, (b) an explicit delivery-guarantee decision for `processWebhookJob()`, (c) regression tests for that guarantee, (d) retry-state caching for the dependency graph. Everything else in the plan is either duplicated work or a deferred shortcut.\n3. **Complexity check:** 5 worker files touched, 5 copies of a scheduler. Below the 8-file gate, but 5 copies of the same new mechanism is the smell the gate is looking for. No complexity gate question; handled as R1/R2 below.\n4. **Search check** (WebSearch; Aside unavailable): BullMQ documents a custom backoff strategy hook returning delay / 0 / -1 (fail now). AWS Builders' Library and Google Cloud client libraries default to full jitter. Webhook guidance is unanimous: retries make delivery at-least-once, so an idempotency key on the receiver side is mandatory.\n Sources: [BullMQ custom backoff strategy](https://docs.bullmq.io/bull/patterns/custom-backoff-strategy), [AWS: timeouts, retries, and backoff with jitter](https://aws.amazon.com/builders-library/timeouts-retries-and-backoff-with-jitter/), [Hookdeck: webhook idempotency](https://hookdeck.com/webhooks/guides/implement-webhook-idempotency), [Webhook reliability 2026 reference](https://www.digitalapplied.com/blog/webhook-reliability-idempotency-retries-engineering-reference-2026)\n5. **TODOS.md:** none in repo.\n6. **Completeness check:** the plan takes three explicit shortcuts (leave duplication, skip regression test, skip caching). Each costs minutes with CC. Recommend the complete version of all three.\n7. **Distribution check:** no new artifact. N/A.\n\n### Scope Challenge findings\n\n| # | Severity | Conf | Where | Finding | Disposition |\n|---|----------|------|-------|---------|-------------|\n| F1 | P1 | 8/10 | PLAN.md:6-8 | Custom inline scheduler rebuilds what the library's retry hooks provide. `\"rather than use the existing job library's built-in retry hooks\"` \u2014 a custom backoff function on the hook gives the same curve control. Scope reduction opportunity. [Layer 1] | pending \u2192 R1 |\n| F2 | P1 | 9/10 | PLAN.md:16-18 | `\"No regression test for the prior at-most-once delivery guarantee\"` understates it: adding retries to `processWebhookJob()` changes the delivery guarantee from at-most-once to at-least-once. That is a contract change to every webhook receiver, not a test gap. | pending \u2192 R3, R4 |\n| F3 | P2 | 9/10 | PLAN.md:11-13 | `\"duplicated across 5 worker files with copy-pasted bodies\"` \u2014 five copies of compute-delay/log/dispatch means five places for a backoff bug to hide. \"Later\" refactors of retry code rarely happen because the bug that motivates them is a 3am incident. | pending \u2192 R2 |\n| F4 | P2 | 8/10 | PLAN.md:6 | Curve parameters are unspecified: no jitter, no delay cap, no max attempts, no terminal disposition (dead-letter vs drop). Without jitter, a downstream outage makes every failed job retry in lockstep. | pending \u2192 R6, R7, R8 |\n| F5 | P2 | 7/10 | PLAN.md:21-23 | `\"re-fetch the full job payload ... recompute the dependency graph\"` on every retry: retry cost scales with payload size times attempts, and the hot path runs exactly when the system is already unhealthy. | pending \u2192 R5 |\n\nScope disposition: no scope reduction question fired (below complexity gate); scope decisions flow through the ledger.\n\n## Decision ledger\n\n### R1: Where the retry scheduler lives (library hook vs custom inline)\nFinding: F1, P1, confidence 8/10, PLAN.md:6-8, reviewer: plan-eng-review (Claude)\nPlan baseline: custom exponential-backoff scheduler inline in each of 5 workers (original proposal, PLAN.md:6-8)\nRuntime evidence: unknown; the job library and worker files are not in this repo. Web evidence: BullMQ/Bull custom backoff hook accepts a function returning delay ms, 0, or -1.\nState: pending\n\nComparison grid:\n\n| Choice | Current | A | B | C |\n|---|---|---|---|---|\n| R1 scheduler location | custom inline per worker, pending | library retry hook + one shared backoff function | custom inline scheduler per worker (as planned) | undecided; bounded probe of the library hook API first |\n| R2 envelope dedup | 5 copies, pending | pending (mostly moot if A) | pending | pending |\n| R3 webhook delivery contract | at-most-once \u2192 implicit at-least-once, pending | pending | pending | pending |\n| R6 jitter | unspecified, pending | pending | pending | pending |\n| R7 delay cap | unspecified, pending | pending | pending | pending |\n| R8 max attempts / terminal disposition | unspecified, pending | pending | pending | pending |\n\nQuestion D4:\nD4 \u2014 Library retry hooks or a custom inline scheduler?\nProject/branch/task: main branch, PLAN.md \"Add background job retry framework\".\nELI10: The job library already knows how to re-run a failed job later; it just asks you \"how long should I wait?\" via a hook. The plan skips that and writes its own wait-and-rerun loop inside each of the five workers. You can get the exact same custom curve by answering the library's question with your own function. Writing your own loop means you also own attempt counting, persistence across worker restarts, and every edge case the library already fixed.\nStakes if we pick wrong: A homegrown scheduler that loses retry state on worker restart or double-fires after a crash is a production incident that the library path cannot have.\nRecommendation: A because it gives the same curve control (the plan's stated reason) with one function instead of five schedulers, and it inherits the library's crash and restart semantics. [Layer 1]\nNote: options differ in kind, not coverage \u2014 no completeness score.\nA) Library hook + one shared backoff function (recommended) (human: ~1 day / CC: ~20 min)\n \u2705 Full curve control through the hook's return value; attempt counting and persistence stay with the library.\n \u2705 Deletes the need for five inline schedulers; the retry bug surface shrinks to one pure function.\n \u274c You are bounded by what the hook exposes (typically delay, fail-now, or retry-now); exotic per-job scheduling needs a workaround.\nB) Custom inline scheduler per worker, as planned (human: ~3 days / CC: ~1 hr, plus ongoing maintenance)\n \u2705 No dependency on the library's hook contract; any scheduling behavior is possible.\n \u2705 Zero learning curve for the library's retry options.\n \u274c You own crash recovery, attempt persistence, and duplicate-fire prevention across restarts, in five places.\nC) Bounded probe first: read the library's hook API, then decide (human: ~2 hrs / CC: ~5 min)\n \u2705 Replaces my web-evidence assumption with the actual hook signature before committing.\n \u2705 Cheap; no implementation change approved yet.\n \u274c Delays the architecture call; if the hook supports a custom function (likely), this is a detour.\nNet: one function on a proven hook vs. five hand-rolled schedulers you must keep correct under crashes.\n\nActual answer: A \u2014 Library hook + shared backoff function (D4 answer)\nAccepted scope: replace the per-worker inline scheduler with the job library's retry hook, driven by one shared backoff function (`computeRetryDelay(attempt, ctx)` or the library's equivalent signature). Attempt counting and retry persistence stay with the library. Curve parameters (jitter, cap, max attempts, terminal disposition) remain pending in R6-R8.\nHistory: none\n\n### R2: Retry envelope duplication across 5 workers\nFinding: F3, P2, confidence 9/10, PLAN.md:11-13, reviewer: plan-eng-review (Claude)\nPlan baseline: leave the copy-pasted envelope (compute delay, log attempt, dispatch) in 5 worker files; refactor \"later\" (PLAN.md:11-13)\nRuntime evidence: unknown; worker files not in this repo. With R1=A, \"compute delay\" and \"dispatch\" move to the library hook; what remains per worker is hook wiring plus attempt logging.\nState: pending\n\nComparison grid:\n\n| Choice | Current | A | B |\n|---|---|---|---|\n| R1 scheduler location | library hook + shared backoff fn (approved D4) | same | same |\n| R2 envelope dedup | 5 copies, pending | one shared retry module: backoff fn + attempt logger + hook registration, imported by 5 workers | each worker wires the hook and logs attempts in its own copy (as planned) |\n| R3 webhook delivery contract | pending | pending | pending |\n| R6 jitter | pending | pending | pending |\n| R7 delay cap | pending | pending | pending |\n| R8 max attempts / terminal disposition | pending | pending | pending |\n\nQuestion D5:\nD5 \u2014 Extract one shared retry module now, or keep per-worker copies?\nELI10: Even with the library doing the scheduling, each worker still has to hook in, say how to back off, and log each attempt. The plan copies that wiring into all five workers and promises to clean up later. One shared module means a backoff bug gets fixed once; five copies means fixing it five times and hoping you found them all.\nStakes if we pick wrong: A jitter or cap fix lands in four of five workers; the fifth hammers a downstream service in lockstep during the next outage.\nRecommendation: A because with R1 approved the shared module is ~50 lines, and every future curve change (R6-R8) lands in one place.\nCompleteness: A=10/10, B=3/10\nA) One shared retry module (recommended) (human: ~half day / CC: ~10 min)\n \u2705 Backoff, logging and hook registration live in one file with one test suite.\n \u2705 R6-R8 curve decisions become one-line config changes instead of five edits.\n \u274c Five workers gain an import and a small adapter call; slightly more indirection when reading one worker.\nB) Per-worker copies, refactor later, as planned (human: ~0 now, ~1 day later / CC: ~0 now, ~15 min later)\n \u2705 No cross-worker coupling; each worker is fully self-contained.\n \u2705 Nothing to design up front.\n \u274c Five copies drift; \"later\" retry refactors rarely happen before the incident that motivates them.\nNet: one place to be right vs. five places to be wrong.\n\nActual answer: A \u2014 One shared retry module (D5 answer)\nAccepted scope: create one shared retry module (backoff function, attempt logger, hook registration helper) with its own unit tests; the 5 workers import it. No per-worker retry envelope code remains.\nHistory: none\n\n### R3: Delivery guarantee for `processWebhookJob()` under retries\nFinding: F2, P1, confidence 9/10, PLAN.md:16-18, reviewer: plan-eng-review (Claude)\nPlan baseline: `processWebhookJob()` is rewritten inside the retry framework; today's at-most-once guarantee is named only as an untested prior behavior (PLAN.md:16-18). As written, the plan silently moves webhooks to at-least-once with no receiver-side dedup handle.\nRuntime evidence: unknown; `processWebhookJob()` not in this repo. Web evidence: every mainstream webhook provider ships at-least-once plus an idempotency/event id.\nState: pending\n\nComparison grid:\n\n| Choice | Current | A | B | C |\n|---|---|---|---|---|\n| R1 scheduler location | library hook (approved D4) | same | same | same |\n| R2 envelope dedup | shared module (approved D5) | same | same | same |\n| R3 webhook delivery contract | at-most-once today; plan implies at-least-once, pending | at-least-once + stable idempotency key (event id) sent on every attempt; contract change documented for receivers | at-most-once preserved: webhook queue configured with max attempts = 1 (no retries) | at-least-once, no idempotency key (plan as written) |\n| R4 regression coverage for R3 | none planned, pending | pending | pending | pending |\n| R6 jitter | pending | pending | pending | pending |\n| R7 delay cap | pending | pending | pending | pending |\n| R8 max attempts / terminal disposition | pending | pending (webhook queue included) | pending (webhook queue excluded) | pending |\n\nQuestion D6:\nD6 \u2014 What delivery guarantee do webhooks have once retries exist?\nELI10: Today a webhook is sent once; if it fails, it's gone (at-most-once). Retrying means a receiver can get the same event twice, e.g. when they processed it but their 200 arrived after our timeout (at-least-once). That is a contract change for every receiver. The standard fix is to send a stable event id with every attempt so receivers can ignore duplicates. Or you keep webhooks out of the retry framework entirely.\nStakes if we pick wrong: Duplicate webhooks with no dedup handle double-charge, double-notify, or double-create on the receiver's side, and they can't tell it's a duplicate.\nRecommendation: A because dropped webhooks are worse than duplicated ones and the idempotency key is what makes duplicates harmless; it is the industry default.\nNote: options differ in kind, not coverage \u2014 no completeness score.\nA) At-least-once + idempotency key (recommended) (human: ~1 day / CC: ~20 min)\n \u2705 Failed deliveries get retried; receivers dedupe on a stable event id header/field.\n \u2705 Matches how Stripe, GitHub and Shopify deliver, so receivers already know the pattern.\n \u274c Public contract change: receivers must be told duplicates are now possible, and the id must be stable across attempts.\nB) Keep at-most-once: webhooks excluded from retries (human: ~1 hr / CC: ~5 min)\n \u2705 No contract change for receivers; existing guarantee is preserved exactly.\n \u2705 Smallest change to `processWebhookJob()`.\n \u274c Webhooks stay lossy; a receiver blip still drops the event forever.\nC) At-least-once with no idempotency key (plan as written) (human: ~0 / CC: ~0)\n \u2705 No extra field or documentation work.\n \u2705 Webhooks get retried.\n \u274c Receivers get undetectable duplicates; this is the outcome the web guidance unanimously warns against.\nNet: reliable delivery with a dedup handle vs. preserved lossiness vs. reliable delivery that quietly breaks receivers.\n\nActual answer: A \u2014 At-least-once + idempotency key (D6 answer)\nAccepted scope: `processWebhookJob()` participates in retries. Every attempt sends the same stable idempotency key (event id generated once at enqueue time and stored with the job, never regenerated per attempt). Receiver-facing docs state the at-least-once contract and the header/field name. Necessary mechanics carried with this approval: key generation at enqueue, key persisted in job data, key emitted on every attempt.\nHistory: none\n\n## Section 1: Architecture review\n\nData flow after R1-R3 (proposed):\n\n```\nenqueue(job) worker\n \u2502 generate eventId (webhooks) \u2502\n \u2502 store job + eventId \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25ba library picks job \u2500\u2500\u25ba handler(job)\n \u25b2 \u2502 ok \u2500\u2500\u25ba done\n \u2502 \u2502 throw\n \u2502 library retry hook\n \u2502 retry/computeDelay(attempt, err)\n \u2502 \u251c\u2500 attempt < max: delay(ms) w/ jitter+cap \u2500\u2510\n \u2502 \u2514\u2500 attempt \u2265 max: terminal (R8) \u2500\u2500\u25ba DLQ / drop\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 re-scheduled after delay \u25c4\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\nRealistic production failure per new codepath:\n- Library hook: downstream outage fails 10k jobs in one minute; without jitter they all retry at t+1s, t+2s, t+4s in lockstep (thundering herd). \u2192 R6.\n- Backoff curve: attempt 20 of pure exponential is 2^20 s \u2248 12 days; without a cap the job is effectively dead but still occupies the queue. \u2192 R7.\n- Terminal attempt: with no max/terminal policy, a poison job retries forever, or (if the library defaults to 1 attempt) never retries at all. \u2192 R8.\n- Idempotency key: if generated inside the handler instead of at enqueue, every attempt gets a new id and dedup silently breaks. Carried as required mechanics of R3=A; regression coverage in R4.\n\n### R6: Jitter on the backoff curve\nFinding: F4 (part), P2, confidence 8/10, PLAN.md:6, reviewer: plan-eng-review (Claude)\nPlan baseline: \"custom exponential-backoff\" with no jitter mentioned (PLAN.md:6-8)\nRuntime evidence: unknown. Web evidence: AWS Builders' Library and Google Cloud clients default to full jitter; BullMQ docs show jitter in the custom strategy example.\nState: pending\n\nComparison grid:\n\n| Choice | Current | A | B |\n|---|---|---|---|\n| R1 scheduler location | library hook (approved D4) | same | same |\n| R2 envelope dedup | shared module (approved D5) | same | same |\n| R3 webhook contract | at-least-once + key (approved D6) | same | same |\n| R6 jitter | unspecified, pending | full jitter: delay = random(0, min(cap, base\u00b72^attempt)) | none: delay = base\u00b72^attempt (deterministic) |\n| R7 delay cap | pending | pending | pending |\n| R8 max attempts / terminal | pending | pending | pending |\n\nQuestion D7:\nD7 \u2014 Add jitter to the backoff curve?\nELI10: When a downstream service hiccups, thousands of jobs fail in the same second. Pure exponential backoff makes them all retry in the same second too, over and over, which can keep the downstream service down. Jitter randomizes each wait so retries spread out. Full jitter (random between 0 and the computed delay) is what AWS and Google ship by default.\nStakes if we pick wrong: Retries arrive as synchronized waves and prolong the very outage they're recovering from.\nRecommendation: A because it is one `Math.random()` in the shared backoff function and it is the default in every serious retry library.\nCompleteness: A=10/10, B=5/10\nA) Full jitter (recommended) (human: ~1 hr incl. tests / CC: ~3 min)\n \u2705 Retry waves spread out; downstream recovery is not re-crushed by synchronized retries.\n \u2705 One line in the shared module plus a deterministic test using an injected RNG.\n \u274c Individual retry timing is no longer predictable to the second; tests need a seeded RNG.\nB) No jitter, deterministic exponential (human: ~0 / CC: ~0)\n \u2705 Exact, predictable retry times; trivial to reason about in logs.\n \u2705 Nothing extra to test.\n \u274c Thundering herd on every downstream outage; the plan's \"full control over the curve\" ends up worse than the library default.\nNet: spread-out retries vs. predictable but synchronized ones.\n\nActual answer: A \u2014 Full jitter (D7 answer)\nAccepted scope: shared backoff function computes `delay = random(0, min(cap, base \u00b7 2^attempt))` with an injectable RNG; unit test asserts bounds with a seeded RNG. `cap` value pending in R7.\nHistory: none\n\n### R7: Delay cap on the backoff curve\nFinding: F4 (part), P2, confidence 8/10, PLAN.md:6, reviewer: plan-eng-review (Claude)\nPlan baseline: no cap mentioned (PLAN.md:6-8); pure exponential reaches 2^20 s \u2248 12 days by attempt 20.\nRuntime evidence: unknown.\nState: pending\n\nComparison grid:\n\n| Choice | Current | A | B | C |\n|---|---|---|---|---|\n| R1 scheduler location | library hook (approved D4) | same | same | same |\n| R2 envelope dedup | shared module (approved D5) | same | same | same |\n| R3 webhook contract | at-least-once + key (approved D6) | same | same | same |\n| R6 jitter | full jitter (approved D7) | same | same | same |\n| R7 delay cap | unspecified, pending | cap = 1 hour (3600 s) | cap = 5 minutes (300 s) | no cap |\n| R8 max attempts / terminal | pending | pending | pending | pending |\n\nQuestion D8:\nD8 \u2014 Cap the maximum delay between retries, and at what value?\nELI10: Exponential backoff doubles the wait each time: 1s, 2s, 4s ... by the 12th retry it's over an hour, by the 20th it's 12 days. A cap says \"never wait longer than X\", so late retries keep happening at a steady pace instead of vanishing into next week. The cap sets the ceiling; how many attempts happen at all is the next question.\nStakes if we pick wrong: Too high or no cap: jobs sit in the queue for days looking alive. Too low: a long downstream outage burns through all attempts in minutes and jobs die before the outage ends.\nRecommendation: A because a one-hour ceiling lets the retry window span a multi-hour outage without a job disappearing for days; it is the common default for webhook and job systems.\nNote: options differ in kind, not coverage \u2014 no completeness score.\nA) Cap at 1 hour (recommended) (human: ~15 min / CC: ~1 min)\n \u2705 Survives a multi-hour downstream outage with retries still arriving every hour at most.\n \u2705 Matches Stripe/GitHub style retry schedules that span roughly a day.\n \u274c A job can stay visible-but-idle in the queue for hours between late attempts.\nB) Cap at 5 minutes (human: ~15 min / CC: ~1 min)\n \u2705 Late retries stay frequent; recovery after a short outage is fast.\n \u2705 Queue age stays bounded and easy to reason about.\n \u274c Combined with a modest max attempts, the whole retry window is under an hour; longer outages kill jobs.\nC) No cap (human: ~0 / CC: ~0)\n \u2705 Simplest formula; nothing to configure.\n \u2705 Aggressive spread on very late attempts.\n \u274c Attempt 20 waits ~12 days; jobs look alive but are effectively dead.\nNet: hours-long retry window vs. minutes-long vs. unbounded.\n\nActual answer: unanswered\nAccepted scope: none\nHistory: none\n"
|
|
}
|