Skip to content

maintainer: gated-submission trigger — predicted-gate-PASS + slop-under-threshold check before calling open_pr #2336

Description

@JSONbored

THE safety-critical chokepoint of Phase 4: the actual code path that decides "call gittensory_open_pr NOW" for an autonomous run. This must conservatively require BOTH a predicted-gate PASS (src/rules/predicted-gate.ts / gittensory_predict_gate) AND a slop score under a configurable threshold (gittensory_check_slop_risk) before the local-write action spec from buildOpenPrSpec (src/mcp/local-write-tools.ts) is ever invoked. Any ambiguity resolves to NOT submitting. This is exactly the kind of autonomous-write trigger the safety-tier system reserves for maintainer-only work — it is the single most consequential decision point in the whole miner runtime.

Deliverables

  • packages/gittensory-miner/src/manage/submission-gate.tsshouldSubmit(candidate) -> { allow: boolean; reasons: string[] } requiring predicted-gate conclusion === "merge"-equivalent AND slop band below the configured threshold
  • Fail-closed on any missing/errored signal (predictor unreachable, slop check errored) — never defaults to allow
  • The actual call site invoking buildOpenPrSpec / gittensory_open_pr is gated exclusively through this function — no other code path may call it
  • Exhaustive unit tests: pass/pass allows, fail/pass blocks, pass/fail blocks, both-fail blocks, and every fail-closed error path
  • A dry-run/observe mode flag (mirroring src/settings/autonomy.ts's AUTONOMY_LEVELS) that logs the decision without ever calling the write path, for safe rollout

References

  • src/rules/predicted-gate.ts (263 lines) — the predicted-gate verdict this reads
  • src/mcp/server.ts:1198 (gittensory_check_slop_risk) — the slop-risk check this reads
  • src/mcp/local-write-tools.ts:32 (buildOpenPrSpec) — the local-write action spec this gates access to
  • src/settings/autonomy.ts (86 lines) — the autonomy-dial pattern (isActingAutonomyLevel, deny-by-default) to mirror for the dry-run gate
  • New: packages/gittensory-miner/src/manage/submission-gate.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