Skip to content

work-items(work-loop): fixed telemetry title and sentinel make two lanes on one repo clobber durable state, including first_drain_complete #1295

Description

@kyle-sexton

This was generated by AI during a loop-lane launch-prompt design session.

Context

/work-items:work-loop resolves its telemetry home to the open issue titled
Lane telemetry: work-loop (exact match) and maintains exactly one status comment on it,
identified by the fixed sentinel MARKER="work-items:work-loop". That comment carries the
machine-readable durable loop state, re-read at every cycle start because "conversation context
is compaction-lossy — the comment, not the conversation, is the source of truth for these
counters."

Both the title and the marker are constants. Two worker lanes running on different machines
against the same repository therefore resolve the same telemetry issue and the same sentinel,
which violates the lane-telemetry contract's "one writer identity owns a marker" rule. Durable
state becomes last-writer-wins across machines.

The consequences are not symmetric with the item-claim story. Item claims are provider-arbitrated
and genuinely safe to run from two machines. Durable state is not:

  • item_cap, clean_streak, and rate_limit_latch are silently clobbered, so the adaptive cap
    and the rate-limit backoff stop reflecting either machine's actual experience.
  • first_drain_complete is the serious one. It is the flag that ends the first-drain C3
    ratification gate. One machine writing it true ends the earn-trust period for both machines,
    widening autonomy without any human ratification — the opposite of the gate's purpose.

The creation-race reconcile already in the upsert does not help: it converges duplicate
comments, not conflicting state written by two live lanes.

Proposed work

Make the telemetry binding distinguishable per writer, so two lanes on one repository do not
share durable state. The launch config is the likely seam — the telemetry home is already
documented as "resolved from launch config."

Whatever shape is chosen, verify it against the exclusion contract: the drain-exit snapshot, the
intake sweep, and attend-queue's attention view all exclude lane-infrastructure issues by the
Lane telemetry: <lane> title contract. A machine-suffixed title must still fall inside that
exclusion, or the telemetry issue starts counting as backlog.

Alternatively, if sharing a repository across machines is out of scope, state that constraint
explicitly in the skill so operators do not discover it by state corruption.

Acceptance criteria

  • Two worker lanes on one repository either maintain separate durable state, or the skill
    states plainly that this configuration is unsupported
  • first_drain_complete cannot be set for one machine by another machine's progress
  • Any new telemetry title shape still falls inside the lane-infrastructure exclusion used by
    the drain exit, the intake sweep, and the attention view

References

  • plugins/work-items/skills/work-loop/SKILL.md (telemetry home, sentinel marker, durable state,
    first-drain C3 ratification)
  • plugins/work-items/skills/attend-queue/SKILL.md (lane-infrastructure exclusion)
  • docs/conventions/loop-lane/README.md §4 (telemetry comment, durable loop state)

Metadata

Surfaced while planning two worker lanes across two laptops against one repository for
throughput. The plan was reduced to one lane per repository as a result.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.priority: highSignificant impact, or blocks an imminent release; staff this cycle.work-class: structuralRefactors, migrations, contract changes; cross-cutting and hard to reverse.

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions