Skip to content

maintainer: closed-loop discovery re-entry trigger #2338

Description

@JSONbored

The final piece that makes the whole runtime genuinely AUTONOMOUS/REPEATING rather than a one-shot tool: on a resolved outcome (merged, or rejected-and-disengaged), automatically re-invoke Phase-1 discovery to select the next candidate, consuming the read-only LoopSummary object (built in the sibling loop-summary issue) as a feedback signal. This is precisely the "fully-closed discovery-loop re-entry" the phase brief calls out as maintainer-only: it is what turns single runs into an unattended repeat loop, and a bug here (e.g. re-entering too fast, ignoring a circuit-breaker, or looping on a permanently-rejected repo) is the top slop-at-scale risk for the whole miner subsystem.

Deliverables

  • packages/gittensory-miner/src/manage/loop-reentry.ts — on a terminal outcome event, calls into Phase-1 discovery with the LoopSummary as input, selecting (or explicitly declining to select) the next candidate
  • A hard rate/session cap (max re-entries per hour/session, configurable, conservative default) enforced independently of any per-repo circuit-breaker
  • Never re-enters on a disengaged (rejected) run without the loop-summary's repeated-blocker tally being consulted first — a repo with N consecutive rejections is auto-paused for that repo, not retried
  • Every re-entry decision appended to the event ledger with the LoopSummary that drove it, for full auditability
  • Integration test: merged outcome → re-entry fires once; rejected outcome with high repeated-blocker tally → re-entry is suppressed and the repo is paused
  • Manual owner sign-off before enabling by default in any profile

References

  • packages/gittensory-miner/src/manage/loop-summary.ts (new, from the loop-summary issue) — the feedback object this consumes
  • packages/gittensory-miner/src/manage/rejection-state-machine.ts (new, from the rejection-state-machine issue) — the terminal disengaged state this respects
  • src/settings/autonomy.ts (86 lines) — deny-by-default pattern precedent for the rate/session cap
  • New: packages/gittensory-miner/src/manage/loop-reentry.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintainer-onlyOwner-only work — yields no Gittensor points.

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions