[prime-time] Worker applied-keys dedup#79
Conversation
|
[PHASE: IMPL] [SLICE: worker-applied-keys-dedup] Landed slice-step 1
|
|
[PHASE: IMPL] [SLICE: worker-applied-keys-dedup] Landed slice-step 2
|
|
[PHASE: IMPL] [SLICE: worker-applied-keys-dedup] Landed slice-step 3
|
|
[PHASE: IMPL] [SLICE: worker-applied-keys-dedup] Landed slice-step 4
|
|
[PHASE: IMPL] [SLICE: worker-applied-keys-dedup] Landed slice-step 5
|
|
[PHASE: IMPL] [SLICE: worker-applied-keys-dedup] Landed final docs/surface/evidence commits.
|
|
[PHASE: IMPL] [VERDICT: READY_FOR_IMPL_EVAL] Slice Commits
Gate Evidence
Notes
|
|
@openhands-agent model=openrouter/qwen/qwen3.7-max output=pr-comment Run IMPL-EVAL for the framework-prime-time blocker slice Read, in order:
Slice-specific note: Verify the applied-keys dedup is durably persisted and idempotent under retry; no in-memory-only set. Production/enterprise bar (hard): real persistence, real error handling, idempotency, observability, and graceful shutdown wherever the archetype demands; NO stubs/no-ops/TODOs/silent fallbacks; every locked contract + test in Run exactly the gate set named in the plan's Lock hygiene: do NOT commit Emit a verdict — |
OpenHands Agent — CompletedModel: openrouter/qwen/qwen3.7-max IMPL-EVAL —
|
| Gate | Command (exact) | Exit | Result |
|---|---|---|---|
| deno check (scoped, unstable-kv on by default) | deno run -A .llm/tools/run-deno-check.ts --root packages/plugin-workers-core --root plugins/workers --root plugins/triggers --ext ts --pretty |
0 | 237 files, 2 batches, 0 occurrences |
| deno lint (scoped) | deno run -A .llm/tools/run-deno-lint.ts --root packages/plugin-workers-core --root plugins/workers --root plugins/triggers --ext ts --pretty |
0 | 237 files, 0 occurrences |
| deno fmt (scoped) | deno run -A .llm/tools/run-deno-fmt.ts --root packages/plugin-workers-core --root plugins/workers --root plugins/triggers --ext ts --pretty |
0 | 237 files, 0 findings |
| deno test (workers-core) | deno test --allow-all --unstable-kv packages/plugin-workers-core/ |
0 | 20 passed, 0 failed |
| deno test (workers plugin) | deno test --allow-all --unstable-kv plugins/workers/ |
0 | 12 passed, 0 failed |
| deno test (triggers) | deno test --allow-all --unstable-kv plugins/triggers/ |
0 | 8 passed, 0 failed (12 E2E ignored, as expected) |
| deno test (dispatcher integration targeted) | deno test --allow-all plugins/workers/worker/job-dispatcher_test.ts |
0 | 3 passed, 0 failed |
| publish:dry-run (plugin-workers-core) | cd packages/plugin-workers-core && deno task publish:dry-run |
0 | Success; one pre-existing unanalyzable-dynamic-import warning on job-dispatcher.ts:30 (not new) |
| arch:check (global) | deno task arch:check |
0 | Only pre-existing findings (packages/cli A14 Jest globals; AP-19 export-default; AP-23 any in exported decl). No new findings attributable to slice files |
| e2e:cli | — | — | Skipped per plan (e2e:cli — N/A, no scaffold-output change) |
Production-bar checks verified independently:
- Durable persistence: KV-backed
KvWorkerIdempotencyStoreover sharedgetKv()handle; no in-memory-onlySet/Mapused for dedup. - Idempotency under retry:
claim → markApplied | releasewithexpireInTTL on bothactive(15 min) andapplied(24 h); explicit testKvWorkerIdempotencyStore release allows a failed delivery to retryand dispatcher testprocessWorkerJob releases a failed claim so redelivery can re-run. - Throw-on-non-durable:
KvWorkerIdempotencyStore rejects incomplete KV implementationstest confirms the constructor refuses silently-non-durable backends. - Structured already-applied (skip, not failure): confirmed in dispatcher output (
[Worker worker-test] Skipping duplicate job 'send-email' (idempotency=job:send-email:msg-1, alreadyApplied=true)). - Observability: span events
worker.job.idempotent_skip/worker.task.idempotent_skip+ claim-source tracking inresolveWorkerIdempotencyKey; unit-tested for caller/message-id/payload-hash precedence and deterministic SHA-256 fallback. - Graceful shutdown: TTL-bounded active claims auto-release if a worker process dies mid-effect.
- Lock hygiene:
deno.locknot modified during the run; no stray files generated.
All locked contracts in plan-meta.json.contracts[] and all items in
plan-meta.json.testPlan[] are delivered and covered by passing tests.
Remaining risks
anyinpublic-schema.ts:41(AP-23). Global arch:check flags this pre-existing warning on a core public type; slice did not introduce or deepen it, but it survives this run. Tracked by the global arch-debt registry, not by this slice.unanalyzable-dynamic-importonjob-dispatcher.ts:30. Pre-existingpublish:dry-runwarning about the optional runtimeimport(specifier); non-blocking for dry-run but worth noting for the wider JSR publish hygiene run. Not introduced by this slice.- Queue/DLQ adapter changes remain out-of-scope for this slice by plan decision (owned separately by
rbp-dlq-contract);packages/queuewas left untouched as locked. - No
e2e:clirun. Excluded per plan (no scaffold-output change). If a later supervisor sweep decides scaffold output was affected, ane2e:clipass can be added as supplementary evidence — none observed in this slice's commit set. fail_debtnot triggered. No new doctrine violations attributable to the slice's changed files; pre-existing warnings (A14 inpackages/cli, AP-19 export-default, AP-23 any) remain in the global registry and are not deepened here.
Run: https://github.com/rickylabs/netscript/actions/runs/27857743725
IMPL-EVAL Verdict: ✅ PASSSlice: Gate Evidence
Contracts Verified
Production Bar Assessment
Slice-Specific VerificationApplied-keys durability and idempotency under retry:
Test Plan Coverage
GapsNone identified. Verdict RationaleAll required gates pass with comprehensive test coverage. The implementation correctly achieves exactly-once-effective semantics for worker job execution through durable KV-backed idempotency keys. The slice meets the production bar for persistence, error handling, idempotency, observability, and graceful failure recovery. No in-memory-only deduplication mechanisms are present. The implementation fully satisfies the locked contracts specified in plan-meta.json. Evaluation conducted by OpenHands agent (independent evaluator session) |
IMPL-EVAL verdict PASS (OpenHands qwen3.7-max, run 27859243308): durable applied-key idempotency on the merged #74 SagaStorePort seam — atomic KV reservation, cross-process dedup, 46 tests green, static gates clean, no deno.lock churn. Rebased on 5c4a458 (#74/#78/#79/#80 landed). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018fq9V7ujx7e1rWXi57qkPG
Blocker slice
worker-applied-keys-dedupFramework prime-time blocker batch — sub-PR into the umbrella
feat/framework-prime-time(#73)..llm/tmp/run/feat-framework-prime-time--supervisor/slices/worker-applied-keys-dedup/(research.md,plan.md,plan-meta.json)..llm/tmp/run/feat-framework-prime-time--supervisor/slices/worker-applied-keys-dedup/implement-brief.md.Draft until the implementation agent reports complete and gates are green.