Skip to content

[FEATURE] Schedule verification-goal proof runs through generic Triggers #356

Description

@Joncallim

Parent tracking issue: #187
Parent programme: #184 / #333
Execution mode: implementation
Depends on: #341, #355
Spec references: SPEC-0009 (Trigger/Event envelope — downstream consumer of generic Trigger substrate), SPEC-0002 (Execution lifecycle), SPEC-0008 (conformance)
Consumed by: #190, #191

Problem Statement

Verification goals need recurring proof runs, but schedule ownership cannot live inside the goal registry/runner. The stale pre-VNext #187 branch designed project-specific scheduling machinery before Forge had persistent Missions and a generic Trigger/Event runtime. Merging that scheduler would create a second scheduling source of truth and weaken zero-token idle/dedupe/causality guarantees.

Desired Outcome

A verification goal can declare cadence/policy that is materialized as a generic #341 schedule Trigger bound to a persistent proof Mission/Workflow. Each eligible occurrence requests the existing #355 on-demand proof Execution. Schedule restart, catch-up, dedupe, disabled state and retries use Trigger semantics; the verification-goal domain owns proof meaning only.

User Story

As the Forge operator,
I want critical “what still works” assertions proven on a controlled cadence,
So that regressions are detected early without an LLM polling loop or a verification-specific scheduler.

Requirements

Implementation Sequence

  1. Cadence-to-Trigger binding contract — versioned mapping from exact goal revision/cadence policy to one [FEATURE] VNext Phase 7 — Trigger/Event runtime with dedupe, causality, and zero-token idle #341 Trigger definition/binding with stable identity and no scheduler code inside goal modules.
  2. Lifecycle synchronization — create/update/disable Trigger binding when current goal revision/cadence/enabled/archive state changes; preserve old binding/occurrence history.
  3. Occurrence -> proof request bridge — validate current goal revision/Resource/ref state, derive deterministic effective proof identity and request [FEATURE] Complete verification-goal on-demand proof execution through VNext #355 through the standard Execution path.
  4. Overlap/dedupe policy — define same-goal/ref overlap behavior, active-run collision and equivalent occurrence handling using [FEATURE] VNext Phase 7 — Trigger/Event runtime with dedupe, causality, and zero-token idle #341 occurrence identity rather than ad hoc locks.
  5. Catch-up/time semantics — map goal cadence policy to [FEATURE] VNext Phase 7 — Trigger/Event runtime with dedupe, causality, and zero-token idle #341 timezone/DST/restart/catch-up contracts; bound missed-run recovery and prohibit silent burst replay.
  6. Stale-state fencing — disabled/archived/revised goal or Resource version conflict makes old queued occurrence ignored/blocked with stable reason; no proof execution starts.
  7. Evidence linkage/projections — occurrence, goal revision, proof Execution/run, canonical outcome/reliability and next/last schedule state remain reconstructable.
  8. Operator status/recovery — minimal schedule state, next/last occurrence/run, skip/dedupe/block/failure reason and allowed manual proof/retry action.
  9. PR331 schedule-test port — review stale branch only for useful time/dedupe/restart test cases; reimplement through [FEATURE] VNext Phase 7 — Trigger/Event runtime with dedupe, causality, and zero-token idle #341, never copy project scheduler architecture.

Primary Code Seams To Inspect First

Orthogonal Checkpoints

  1. Ownership: no timer/cron/schedule queue/domain state added inside verification-goal runner; [FEATURE] VNext Phase 7 — Trigger/Event runtime with dedupe, causality, and zero-token idle #341 is sole delivery authority.
  2. Revision races: cadence/revision/enabled/archive change while occurrence is queued/claimed/Execution starts.
  3. Time correctness: timezone/DST, leap/calendar boundaries as supported, long downtime, restart, clock skew assumptions and catch-up limits.
  4. Dedupe/concurrency: duplicate occurrences, overlap with active proof run, delayed retries, event storm and dispatcher restart.
  5. Zero-token: scheduler/cadence/skip/unchanged handling cannot invoke a model; [FEATURE] Complete verification-goal on-demand proof execution through VNext #355 proof stays deterministic by default.
  6. Evidence lineage: old Trigger/goal revision history immutable, current projection rebuildable, no run attributed to wrong revision/ref.
  7. Failure separation: Trigger delivery/bridge failure vs proof runner failure vs proof assertion failure remain distinct.
  8. Stale authority: disabled/revised goal and cancelled/revoked Mission block old occurrence despite Redis/stale label state.
  9. Scope/regression: [FEATURE] Complete verification-goal on-demand proof execution through VNext #355 runner code is reused, not forked; merged PR328-330 goal behavior remains green.

Acceptance Criteria

Out of Scope

Implementation Scope

Medium to Large - expected as 2-4 small PRs: binding/lifecycle; occurrence bridge+dedupe/catch-up; evidence/operator status; final adversarial time/restart gate.

Technical Notes

The core review question at every checkpoint is: “Could this feature still work if all verification-goal-specific scheduler code were deleted?” The answer must be yes because #341 owns delivery.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependency-blockedREADINESS PROJECTION — Issue is blocked by unresolved dependencies. This label is a cache.enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions