GeniusVentures / GeniusVentures/SGProcessingManager

Add cancellable execution contexts, deadlines, budgets, and progress events

Open
#13 0 comments 0 reactions 1 assignee View on GitHub

@itsafuu is already working on this.

Since Jul 28, 2026.

Dominant language
C++
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Problem

The processor interface is a synchronous StartProcessing() call with an atomic percentage value. It has no cancellation token, deadline, resource budget, checkpoint, structured progress event, or partial-result callback.

This makes long GCS, inference, compute, and render jobs hard to stop safely, monitor by pass, or limit when a branch is no longer needed.

Scope

Introduce an execution context passed through ProcessingManager and every executor with:

  • Execution, attempt, pass, and subtask identifiers.
  • Cooperative cancellation token.
  • Overall and per-pass deadlines.
  • CPU, GPU, RAM/VRAM, disk, network, runtime, and output-size budgets where enforceable by the executor.
  • Structured progress events with pass ID, stage, completed work, total work, and message.
  • Partial-result and checkpoint callbacks for processors that support them.
  • Clear terminal states for completed, cancelled, timed out, budget exceeded, and failed.
  • Safe cleanup of Vulkan resources, MNN sessions, loaded artifacts, and pending asynchronous saves.

Do not duplicate SuperGenius queue locking or task ownership. This issue defines the SGProcessingManager execution-control contract that SuperGenius can drive.

Acceptance criteria

  • A running MNN or Vulkan test job can be cancelled without leaking resources or publishing a successful result.
  • Deadline and output-size limits produce distinct typed failures.
  • Progress events identify the active pass and stage rather than only exposing one float.
  • Checkpoint-capable tests can resume from a saved checkpoint; processors without checkpoint support report that clearly.
  • Existing processors remain usable through an adapter during migration.

Supports GCS early cancellation and long-running compute/render workloads.

Base implementation and review work on the branch consumed by SuperGenius/develop.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.