Skip to content

slots observe mode: double count when slots are off, stored held slots, seams list, tests (#332 follow-ups) #353

Closed

Description

@scuttletoby

Follow-ups from the SAFE lens on #332 (DS3: agentSlots mode with an observe-only capacity rule; fixed #307): #332 (comment)

None changes a decision, but items 1-2 skew the observe data the next step (D4) relies on, so fix them before D4 reads it.

  1. Slots off counts one agent twice (SlotObserver.ts ~222-230): for 30 s after an allow, an agent that already shows a run counts as running AND starting (the lens's probe: one running agent showed as 2). Slots off is the new default, so the data leans towards "refuse". Fix: keep the child thread id with each start and drop the start once its run shows.
  2. Held slots kept in the wait store are not counted (SlotGate.ts ~266 passes only the in-memory held slots; the real decision also reads the store at ~213). After a restart the rule counts too few agents.
  3. slotRule in wait_list has no test: removing it (WaitService.ts ~972) leaves every test green.
  4. Seams list: AgentScope.ts ~38 and agentScope.ts ~434 are upstream files changed by dynamic slots: slot gate observe mode, mode setting, old settings mapped (DS3) #332 but not listed in .github/fork-seams.json, so the seam check does not cover them. List them (or move the change into fork files).
  5. Nit: the observer fiber starts on the caller's stack inside the gate lock (SlotObserver.ts ~247). Start it with startImmediately: false so "never delays a decision" holds whatever the read does.

Each item: a test that fails first, then the fix; mutation-check the new guards. State question: a restart with held slots in the store (item 2), an agent that starts and shows its run within the 30 s window (item 1).

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions