Consume durable work records with stable identity. Claim a record before acting, acknowledge only after the effect is committed, and make retries idempotent.Log-as-queue loops
Drive work from a durable execution record.
durable_work_consumptionRECORD STATUSCandidate · v0.1.0UML class view
The proposed contract drawn as participant roles, received calls, and numbered dependencies.
Object interactions
The same roles and calls as a class collaboration and a numbered message sequence.
Pointcut
Where the mechanism applies. All four dimensions belong to the proposed match, not just its vocabulary.
- Context
- New work is represented by durable append-only records.
- Trigger
- A consumer polls or subscribes to unseen records.
- Structure
- Event identity, append order, consumer cursor, and acknowledgement.
- Effect
- Work advances from the log without replaying already completed effects.
Protected contract
The obligation that clients, operators, and auditors should be able to rely on.
- Requires
- Records have stable identity and consumers retain progress.
- Ensures
- Each effectful unit has an idempotency or acknowledgement rule.
- Invariant
- Consumer crash does not erase unacknowledged work.
- Violation
- Duplicate delivery is deduplicated or documented as at-least-once.
Negative control
An in-memory queue is not log-as-queue.
Variation & lifecycle
The hot spot is admitted only where the protected semantics survive.
Permitted variation
SQL log, file log, queue adapter, polling, and projection.
Test obligation
Test crash before ack, duplicate delivery, out-of-order reads, and replay.
Evolution question
Did durable task records become the scheduling substrate?
Prompt + code design
An illustrative prompt and a small design sketch for the proposed contract. Names and APIs are invented; this is not a repository excerpt.
def consume_one(queue, handler):
record = queue.claim(timeout=30)
if record is None:
return None
if not queue.is_seen(record.id):
handler.apply_once(record.id, record.payload)
queue.mark_seen(record.id)
queue.ack(record.id)
return record.idIllustrative design sketch. The acknowledgement rule, not the transport name, makes the queue durable. This example is a teaching aid, not implementation evidence or a conformance claim.
Detection & matching
The frozen rule that retrieves this record, the canonical source exemplar, and the control that should stay unmatched.
- Join point
durable_work_consumption- Source locator
- See the source record.
- Lexical cue
(?i)\b(?:event[_-]?log|append[_-]?(?:event|item)|event[_-]?queue|log[_-]?as[_-]?queue)\bFrozen expression, v0.1.0. A match is a retrieval cue, not a confirmed implementation.- Aliases
- None
- Canonical exemplar
- OpenHands/automation
openhands/automation/models.py:222Support: tests/test_scheduler.py:703 - Negative control
- An in-memory queue is not log-as-queue.
Scope-anchored review. pohe-agent analyze <repo> --pattern P13 anchors the cue to its enclosing declaration and checks a separate operational signature for all four pointcut dimensions. Missing roles and negative-control risks remain visible; a structural match is not E2/E3. Calibration report ↗
Repository files
Up to five public files retrieved by the frozen cue and pinned to the audited commit. A match is a place to inspect, not a confirmed implementation.
openhands/automation/models.py:222CANONICAL SOURCE02affaan-m/ECCskills/videodb/scripts/ws_listener.py:114RETRIEVAL CUE03agno-agi/agnolibs/agno/agno/agents/base.py:2581RETRIEVAL CUE04anomalyco/opencodepackages/ai/src/schema/events.ts:472RETRIEVAL CUE05browser-use/browser-usebrowser_use/agent/service.py:4019RETRIEVAL CUEEvidence & provenance
Each layer answers a different question. Do not substitute retrieval for review.
Source-located exemplar
A concrete source anchor is available for this proposed record. It is one exemplar, not evidence that all repositories—or every contract field—conform.
Review boundary: this candidate and its specification come from an AI-assisted study. Independent human validation remains open.
61.1% of repository families in the frozen panel have at least one current cue, historical cue, or canonical source layer. This is not confirmed prevalence.
Current lexical-cue repositories: 23 / 413ddfee594d21openhands/automation/models.py:222tests/test_scheduler.py:703Persistent event table doubles as a poller-consumed work queue.
Exploratory retrieval cue Regex / v0.1.0
(?i)\b(?:event[_-]?log|append[_-]?(?:event|item)|event[_-]?queue|log[_-]?as[_-]?queue)\bThis expression is a discovery instrument only. A match is a retrieval cue—not a confirmed implementation, pointcut match, or contract proof.